reset cookies

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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 _)
 
Back
Top