reset cookies

G

Guest

I am modifying the asp.net e-commerce starter kits. I wish to create a
logout routine, so that another user can use the same computer. Currently the
user information and cart information is stored in a cookie.

The approach I am taking is to reset the cookies: basically do the opposite
of this code here:
context.Response.Cookies["ASPNETCommerce_CartID"].Value =
tempCartId.ToString();

but when I try to assign any value the the cookie I am told:
"...Property or indexer 'System.Web.HttpCookieCollection.this[string]'
cannot be assigned to -- it is read only"

TFH
 
K

kiran

Try this:

HttpCookie myCookie = context.Response.Cookies["ASPNETCommerce_CartID"];
myCookie.Value = tempCartId.ToString();
context.Response.Cookies.Set(myCookie);


--

|\/\/\/\/\/|
| | V.V.P.C.K Kiran Kumar
| (o)(o)
c _)
 

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