Problem with detecting cookie
- From: Joe <Joe@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Jul 2005 09:36:04 -0700
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>
.
- Follow-Ups:
- RE: Problem with detecting cookie
- From: Tu-Thach
- RE: Problem with detecting cookie
- Prev by Date: Re: C# Function - how to use in both aspx page and ascx user control
- Next by Date: Datagrid, posted data, and viewstate size
- Previous by thread: CustomValidator for Radio Button
- Next by thread: RE: Problem with detecting cookie
- Index(es):