Problem with detecting cookie



Hi,

I have a asp.net page that checks if any one of the two cookies exists. If
none of the cookies exist then redirect the user to login page.
Cookie “try” doesn’t exists. I can see that cookie “mode” exist, but for
some reason the following code fails to detect it and keeps redirecting user
to login.aspx page which it shouldn’t because the cookie “mode” exists

Can someone tell me what could be the problem?

Thanks for your help

Joe


<script runat="server">
Sub page_load(S as Object, e as EventArgs)
If (Request.Cookies("try") Is Nothing ) or (Request.Cookies("mode") Is
Nothing ) Then
Response.Redirect("login.aspx")
End If
End Sub
</script>

.