<%@ Page Language="vb" %>
Setting cookies in ASP.NET
<%
Dim Cookie1 As New HttpCookie("Cookie1")
Dim Cookie2 As New HttpCookie("Cookie2")
Dim ExpiryDate As DateTime = DateTime.Now()
ExpiryDate = ExpiryDate.AddHours(1)
Cookie1.Value = "Cookie from rntsoft.com"
Cookie1.Expires = ExpiryDate
Cookie1.Path = "/"
Cookie2.Values("V1") = "1"
Cookie2.Values("V2") = "2"
Cookie2.Values("V3") = "3"
Cookie2.Expires = ExpiryDate
Cookie2.Path = "/"
Response.Cookies.Add(Cookie1)
Response.Cookies.Add(Cookie2)
Response.Write("Cookies written")
%>