读书人

求Forms模式验证用户登录的验证过程程

发布时间: 2012-02-09 18:22:27 作者: rapoo

求Forms模式验证用户登录的验证过程程序!
登录窗口有:
用户类型:ADMIN/USER
用户名: ***
密码: ***

按扭: 确定 重填

注册信息:ID USERTYPE USERNAME PWD PWDSURE USER_EMAIL

用户数据库:库名:ssdb 用户表Users


[解决办法]
参考:
http://www.cnblogs.com/luomingchao/articles/474674.html
[解决办法]
asp.net中使用窗体身份验证
[解决办法]
和我的简单网站登录差不多,呵呵。
[解决办法]
邮箱给我发过来。。我给你一个类似的例子。。。
给分
[解决办法]
刚好在做项目 给你部分参考吧

C# code
  protected void BtnLogin_Click(object sender, EventArgs e)    {                haifei.BLL.HF_USER BLLHFUSER = new haifei.BLL.HF_USER();        string PassMd5 = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(this.TxtPassword.Text,"MD5");        bool Islogin = BLLHFUSER.Login(this.TxtUsername.Text, PassMd5);        if (Islogin == true)        {            System.Web.Security.FormsAuthentication.RedirectFromLoginPage(this.TxtUsername.Text, true);            HttpCookie lcookie = Context.Response.Cookies[FormsAuthentication.FormsCookieName];            lcookie.Expires = DateTime.Now.AddYears(1);        }           } 

读书人网 >asp.net

热点推荐