What's the API for read/write cookie

F

feng

I need to create cookies in user's machine from my ASP.Net
code and I also need to read them. How do I do that? What
is the API (name space?) for this in APS.Net?

Thanks
 
M

Michael Ramey

You can write cookies with the Response Object
Response.Cookies("cookieName") = myObject

You can read cookies with the Request Object
myObj = Request.Cookies("cookieName")
 

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

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top