I am developing with VS.NET 2003 on the ASP.NET 1.1 platform.
I don't know how to get around this 'Object reference not set to an instance
of an object' error.
How should I check to see if a session variable exists?
Shouldn't just erifying that the variable does not equal null do the job?
The very first time this page loads, the variable will not exists as it does
not get assigned until the user interacts with a diffrent page.
On a round trip from that other page however, the variable will exist.
As it is now, I get
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Source Error:
Line 90: DDL_BlockList.DataSource =
bizObj.Get_Distinct_Block_Lists(IB_Acct);Line91: DataBind();
Line 92: if(Session["NewList"].ToString() != "")
Line 93: DDL_BlockList.SelectedValue = Session["NewList"].ToString();
Line 94: