--
Dim objcookie As HttpCookie
objcookie = Request.Cookies("ckusername")
Dim objckuserid As HttpCookie
objckuserid = Request.Cookies("ckuserid")
If objcookie AND objckuserid Is Nothing Then <------
--
I get this error when I execute the page:
Compiler Error Message: BC30452: Operator 'And' is not defined for types 'System.Web.HttpCookie' and 'Boolean'.What you're doin ghtere is ANDing the cookies together, not the boolean values. You should also use the andalso operator here, as it's relatively faster:
If (objCookie is Nothing) AndAlso (objckUserId is Nothing) Then
...
End If
<oops> that was exactly it! thanks.
0 comments:
Post a Comment