CSharp examples for System.Web:Cookie
Set Cookie Time
using System.Web; using System.Text; using System.Linq; using System.Collections.Generic; using System;/* ww w .j av a2s . c o m*/ public class Main{ public static void SetCookieTime(string name,int day) { var httpCookie = HttpContext.Current.Response.Cookies[name]; if (httpCookie != null) httpCookie.Expires = DateTime.Now.AddDays(day); } }