复制代码 代码如下:
Response.Cookies["uid"].Value = "20";
Response.Cookies["LoginCode"].Value = "58469";
复制代码 代码如下:
Response.Cookies["uid"].Expires = DateTime.Now.AddDays(1);
Response.Cookies["LoginCode"].Expires = DateTime.Now.AddDays(1);
复制代码 代码如下:
Response.Cookies["LoginCode"].Expires =DateTime.Now.AddHours(1);
复制代码 代码如下:
if (Request.Cookies["uid"] != null)
{
string ruid = Request.Cookies["uid"].Value;
}
复制代码 代码如下:
System.Web.HttpCookie user_cookies_id=new HttpCookie("uid");
user_cookies_id.Value="20";
user_cookies_id.Expires=DateTime.Now.AddDays(1);
Response.AppendCookie(user_cookies_id);
--------------------------------
HttpCooKie acookie=new Httpcookie("lastvisitcounter");
acookie.value=lastvisitcounter.ToString();
acookie.Expires=DateTime.MaxValue;
Response.Cookie.Add(acookie);
if(Request.Cookies["lastvisitcounter"]==null)
{
textbox1.text="1";
}
else
{
HttpCookie acookie=request.Cookies["lastvisitcounter"];
textbox1.text=server.HtmiEncode(acookie.value);
}
新闻热点
疑难解答
图片精选