J
Jeff
I have a vb.net application (2005) requiring session variables and want to
test to make certain that the user's cookies are enabled.
I can set a test session variable on one page and attempt to read it on the
next with the code below in order to determine if the user has their
browser's cookies enabled, but is there a good way to do this on the
first/default page without a redirect to another page that will actually do
the test?
Thanks
Jeff
'On first page
Session("CookiesEnabled") = True
'On second page
If Not AreCookiesEnabled() = True Then
Response.Redirect("~\CookieError.aspx")
End If
Public Function AreCookiesEnabled() As Boolean
On Error GoTo A
If Session("CookiesEnabled") = True Then
Return True
End If
A: Return False
End Function
test to make certain that the user's cookies are enabled.
I can set a test session variable on one page and attempt to read it on the
next with the code below in order to determine if the user has their
browser's cookies enabled, but is there a good way to do this on the
first/default page without a redirect to another page that will actually do
the test?
Thanks
Jeff
'On first page
Session("CookiesEnabled") = True
'On second page
If Not AreCookiesEnabled() = True Then
Response.Redirect("~\CookieError.aspx")
End If
Public Function AreCookiesEnabled() As Boolean
On Error GoTo A
If Session("CookiesEnabled") = True Then
Return True
End If
A: Return False
End Function