Thursday, March 29, 2012

Object reference error : Cookies

I get the following error message:

Object reference not set to an instance of an object

With a reference to the following line of code:

UserID = ctype(request.cookies("Details")("UserID"),integer)

In the login page I created the cookie with the following line of code:

 response.cookies("Details")("Login")=Login.Text

I am new to using cookies so I was hoping someone might help me out.

I think I may have cheated when creating the cookie so it is not set up properly??

Any help would be great
ThanksHello, what is UderID ?
is is a textbox ? a label ? if yes

u should use
UderId.Text = ......

0 comments:

Post a Comment