62,046
社区成员
发帖
与我相关
我的任务
分享
//查询是否存在Cookie
public static bool IsHaveCookie()
{
HttpCookie mycookie = HttpContext.Current.Request.Cookies["User"];
if (mycookie != null)
{
HttpContext.Current.Session["Uid"] = mycookie.Values["uid"]; //重新设置Session["Uid"]
return true;
}
else {
return false;
}
}