http://www.nullskull.com/a/810/aspnet-cookies-faq.aspx
http://www.codeproject.com/Articles/244904/Cookies-in-ASP-NET
http://www.code-sample.com/2014/08/aspnet-mvc-cookie-implementation.html
http://stackoverflow.com/questions/3716710/how-to-check-cookie-enabled-for-the-browser-or-not
HttpCookie mswEventIDCookie = new HttpCookie("mswEventIDCookie", id);
mswEventIDCookie.Expires = DateTime.Now.AddDays(10);
Response.Cookies.Add(mswEventIDCookie);
if (Request.Cookies["mswEventIDCookie"] != null)
{
id = Request.Cookies["mswEventIDCookie"].Value;
}
MSWEvent mswEvent = repository.FindMSWEvent(idnew);
ViewBag.MSWEventName = mswEvent.Name;
ViewBag.MSWEventId = mswEvent._id;
No comments:
Post a Comment