Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing for session cookies
Message
 
 
To
07/10/2005 16:12:28
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01057328
Message ID:
01057511
Views:
9
What kind of error? A null reference?

Have you tried wrapping it like so:

If Not Request.Cookies("userInfo") Is Nothing Then
Label1.Text = _
Server.HtmlEncode(Request.Cookies("userInfo")("userName"))
Label2.text = _
Server.HtmlEncode(Request.Cookies("userInfo")("lastVisit"))
End If



>Is there a way to test if a user's browser has the Always Allow Session Cookies turned on in their browser?
>
>My Asp.net webform creates and captures a cookie when the user navigates to this webform. But if their browser does not have the Always Allow Session Cookies turned on, then my webform throws an error.
>
>Can I test for Sessions cookies being turned on?
>
>Thanks,
>
>Jerry
Previous
Reply
Map
View

Click here to load this message in the networking platform