Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

expiring a cookie

Status
Not open for further replies.

nnmmss72

Programmer
May 14, 2006
110
IR
i am using cookie, so add some values on it, in a special page i just retreive its value and want to be deleted.so i have set its expire time to

Cookie.Expires = dt.AddYears(-30);.

i have set the expire time on creation time but excatly on the page which i want to expired in that page. but it doesn't expired, it just be expired when th einternet explorer closed and then opened. how can i expire a cookie when the iternet explorer is opened and immidiately?
 
cookies are designed to persist information between browser sessions, if you are only using the information with the same session, or even same page use the Session or ViewState bag.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top