How to disable previous cookies programatically?
I have a textbox with calender with min days & max days condition.When I fill the application next 4-5 days,If I click on that textbox, it will shows previous date in cookies. So how to disable that cookies programmatically ?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Jun 23, 2015, 1:58 AM EDT
HttpCookie _userInfoCookies = new HttpCookie("UserInfo"); //Adding Expire Time of cookies before existing cookies time _userInfoCookies.Expires = DateTime.Now.AddDays(-1); //Adding cookies to current web response Response.Cookies.Add(_userInfoCookies);Sujeet SumanRank #790 · 2.9K reputationPosted Jun 23, 2015, 3:42 AM EDT
{
HttpCookie myCookie = new HttpCookie("UserSettings");
myCookie.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(myCookie);
}