Path-specific Cookie Demonstration

Writing a single cookie called COOKIETEST2 with a value of "MyFirstValue" and an expiration one day in the future using the code below. Note that the path you enter is case-sensitive, and that you may need to experiment to get the right case.

Response.Buffer = true
Response.Cookies("COOKIETEST2") = "MyFirstValue"
Response.Cookies("COOKIETEST2").Expires = date + 1
Response.Cookies("COOKIETEST2").path = "/csc123/AspSamples/Cookies/DomainTest"

View Cookie Value

Cookie Samples Home

Show cookies for this path