Description
This describes how to
create a cookie in an ASP.NET page and then read the cookie on another page.
Building the Cookie
Dim c As New System.Web.HttpCookie("mycookie", "my cookie value") c.Expires = Now.AddDays(2) Response.Cookies.Add(c)
Reading the Cookie
If Not Request.Cookies("mycookie") Is Nothing Then Response.Write(Request.Cookies("mycookie").Value.ToString) End If
|