473,486 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

"Object reference not set to an instance of an object.

1 New Member
Expand|Select|Wrap|Line Numbers
  1. protected void Page_Load(object sender, EventArgs e)
  2.     {
  3.         if (!IsPostBack)
  4.         {
  5.             BindState();
  6.             BindApplication();
  7.  
  8.             prevPage = Request.UrlReferrer.ToString();// the error is occured on this line
  9.         }
  10.     }
Mar 25 '15 #1
1 1564
Rabbit
12,516 Recognized Expert Moderator MVP
Please use code tags when posting code or formatted data.

UrlReferrer is probably null. You can't run ToString() on a null. There's no guarantee that UrlReferrer is populated.
Mar 25 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
6330
by: terminator800tlgm | last post by:
I don't understand the difference between ojbect handle and reference. For example, class Stack { private: CD cd_obj; // cd object DVD & dvd_ref;// dvd reference Why is it that dvd_ref can...
3
2650
by: vikenk | last post by:
Hello, This is my first post to this group. A little background first: I'm not not new to web-design, but new to manual coding :>) I'm trying to move from total dependence on FrontPage to more...
3
336
by: thejackofall | last post by:
Hi. I have a tricky question. Suppose I have a member or local variable named XYZ. I want to reference the object using a string, "XYZ". In code, I want to do the following. Checkbox...
6
2068
by: frankplank | last post by:
Hi *, I'm wondering if it is possible to create a C# object, and reference it *explicitly* in an excel document. I imagine this will be more possible if I programmatically populate the excel...
0
1540
by: Pedro Correia | last post by:
Hello, When i run my aspx i get this weird error: System.NullReferenceException: Object reference not set to an instance of an object. at emp.PAGTRF.InitializeComponent() at...
3
1560
by: Martin | last post by:
Hi Group I apologize for this very basic (I guess) question. I had a look in the posts and on MSDN but don't know where to start. I'm grateful for any push in the right direction. I just don't...
10
1885
by: Chris Morse | last post by:
Hi, I'm trying to figure out how to dynamically load an assembly and get an IClientPlugin interface to a class. I can get an "Object" reference to it after doing an "Activator.CreateInstance"...
2
1532
by: Rich | last post by:
Hello, I am trying to reference an object that already exists, ie, I have a dll project (dllProj) which contains a simple form. Then I have a main app and a secondary app which both have...
6
2206
by: kalaivanan | last post by:
hi, i am a beginner in c#. i have theoretical knowledge about object, reference and instance. but i want to know clearly about what is an object, reference and instance. can any one help me? or...
6
3387
by: kbin | last post by:
Hi all, I'm wondering if it is possible to have some sort of soft reference to an object's properties by using a string representing the property name. Let me explain by an example, here is my...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7173
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7305
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5427
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4863
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3066
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
259
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.