473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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 1561
Rabbit
12,516 Expert Mod 8TB
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
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
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
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
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
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
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
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
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
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
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.