cookies in asp.net

S

Stimp

hi all,

I'm creating a cookie in the http context as follows:

Dim objCookie As HttpCookie = New HttpCookie("UserDetails")
objCookie.Values.Add("UserName", rRow("UserName"))

Response.Cookies.Add(objCookie)


When I try to delete the cookie using:

Response.Cookies.Remove("UserDetails")


it doesn't remove the cookie from the browser cache.

Is this the correct syntax for creation and removal of asp.net cookies?

Thanks,
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top