is there a way to check if cookie exists?
Printable View
is there a way to check if cookie exists?
if you need to check if a cookie exists you can just check if it is null as with any request parameter.
Code:if(Request.Cookies["monster"] == null)
thanks for the code but im using visual basic language so this code doesnt work. i tried this:
If Request.Cookies("monster") = Null Then
but that doesnt work either because it says that "null" is not declared.
I've not done vb for a while but I believe that it is nothing in vb.
eg.
Code:If Request.Cookies("monster") Is Nothing Then
it works!!! thanks a lot :D