会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
往事隨風
C#.NET
博客园
首页
联系
管理
订阅
C# 操作Cookie
set Cookie
#region
set Cookie
protected
void
createPageSize(
string
count)
{
HttpCookie createCookie
=
new
HttpCookie(
"
PageCount
"
,count);
createCookie.Expires
=
now.AddMinutes(
2000
);
Response.Cookies.Add(createCookie);
}
protected
HttpCookie getPageSize()
{
HttpCookie cookie
=
Request.Cookies[
"
PageCount
"
];
return
cookie;
}
protected
void
deletePageSize()
{
if
(Request.Cookies[
"
PageCount
"
]
!=
null
)
{
HttpCookie myCookie
=
new
HttpCookie(
"
PageCount
"
);
myCookie.Expires
=
DateTime.Now.AddDays(
-
1d);
Response.Cookies.Add(myCookie);
}
}
#endregion
posted @
2007-06-16 17:17
芙蓉客
阅读(
188
) 评论(
0
)
收藏
举报
刷新页面
返回顶部
公告