Click here to Skip to main content
16,021,125 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created cookie using javascript named jsdetect and set the expiry in days.

When I check the cookie expiry date using c# code, Request.cookies["jsdetect"].expires ,it is showing 01/01/0001 always

How can I clear the cookie using c# which was created in javascript.
Please do the needful.
Posted
Updated 8-Nov-10 22:50pm
v2
Comments
Dalek Dave 9-Nov-10 4:50am    
Edited for Readability.

 
Share this answer
 
Here's a way to do it:

C#
HttpContext.Current.Response.Cookies.Remove("jsdetect");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900