How do I check to see if a cookie exists or not?
I tried these 3 but they don't work...
If Not Request.Cookies("UserSettings")("IsAdmin") Is Nothing Then...
If Request.Cookies("UserSettings")("IsAdmin") IsNot Nothing Then...
If Not IsNothing(Request.Cookies("UserSettings")("IsAdmin")) Then...
They all give me a System.NullReferenceException.
Thanks!
bruce barker - 12 Mar 2008 21:39 GMT
If Not Request.Cookies("UserSettings") Is Nothing Then
If Not Request.Cookies("UserSettings")("IsAdmin") Is Nothing Then
...
end if
end if
-- bruce (sqlwork.com)
> How do I check to see if a cookie exists or not?
>
[quoted text clipped - 7 lines]
>
> Thanks!