0

I' ve my cookie to

Dim authCookie As New HttpCookie(FormsAuthentication.FormsCookieName)

I've just started learning about cookies not long ago,can I retrieve the cookie that I've set by using the code below?

Dim authCookie As String = FormsAuthentication.FormsCookieName

        If Not Request.Cookies(authCookie) Is Nothing Then
            'Display requested page
        Else
            Response.Redirect("Login.aspx?")
        End If
2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by qinise4
0

First you need to set a cookie using something like

Response.Cookies("MyCookie") = 1233654

then to retrieve it you use something like

Request.Cookies("MyCookie").Value
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.