M
moondaddy
I need to set a variable to a session variable (if that's what you call it)
like this:
dim ds as dataset = HttpContext.Current.Session("CustDataSet")
But I get an exception if this variable in the current session hasn't been
set yet so I need to test it. I tried:
If HttpContext.Current.Session("CustDataSet") = nothing then
HttpContext.Current.Session("CustDataSet") = GetCustDataSet()
End If
But I get an exception on this also and the exception message is:
"Object reference not set to an instance of an object."
How can I test for this?
like this:
dim ds as dataset = HttpContext.Current.Session("CustDataSet")
But I get an exception if this variable in the current session hasn't been
set yet so I need to test it. I tried:
If HttpContext.Current.Session("CustDataSet") = nothing then
HttpContext.Current.Session("CustDataSet") = GetCustDataSet()
End If
But I get an exception on this also and the exception message is:
"Object reference not set to an instance of an object."
How can I test for this?