G
Guest
Hi,
I have a page which creates a cookie and adds it to the cookies collection.
On the next page it is retrieved, but trying to do so throws an exception,
"Object reference not set to an instance of an object".
The line it fails on is:
if (HttpContext.Current.Request.Cookies["Master"]["UserID"] != null)
As I am testing to see if it is null, I wouldn't expect it to throw a
NullReference exception.
Anyone have any ideas?
I have a page which creates a cookie and adds it to the cookies collection.
On the next page it is retrieved, but trying to do so throws an exception,
"Object reference not set to an instance of an object".
The line it fails on is:
if (HttpContext.Current.Request.Cookies["Master"]["UserID"] != null)
As I am testing to see if it is null, I wouldn't expect it to throw a
NullReference exception.
Anyone have any ideas?