登陆
HttpCookie UserCookie = new HttpCookie("UserName",UserName);
Response.Cookies.Add(UserCookie);注销
Request.Cookies.Clear();
//将Cookies["UserName"]置空
HttpCookie customerCookie = new HttpCookie("UserName", string.Empty);
Response.Cookies.Add(customerCookie);
HttpCookie UserCookie = new HttpCookie("UserName",UserName);
Response.Cookies.Add(UserCookie);注销
Request.Cookies.Clear();
//将Cookies["UserName"]置空
HttpCookie customerCookie = new HttpCookie("UserName", string.Empty);
Response.Cookies.Add(customerCookie);
解决方案 »
- EeekSoft.Web.PopupWin.dll控件 和这个控件相同功能有么
- 100分GridView的帖子!!!!!
- 将VB.net程序改写为C#.net程序,出错。如何修改。
- .net中如何将样式文件class应用到控件中?
- 【有关虚拟主机租用的问题?请大家帮忙看看。谢谢!】
- [求救]关于正则表达式
- 小白问题 - Row updating event in gridview c#
- (我已经很穷了)我用DropDownList的SelectedIndexChanged事件编成时叶面没反应
- 在vs.net的环境下,怎么做网站?能像dreamweaver和iis那样用吗?
- 准备做一个收费的课件点播系统,请大家给点思路
- 如何在客户端打开一个word文件
- Request.Params问题
不过以上可以配合FormsAuthentication,创建一个身份验证:FormsAuthentication.SetAuthCookie(UserName, false);
通过判断Request.IsAuthenticated的办法来实现验证
如果Web application包含几个页面,page_load好像就不行了吧。