⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.aspx.cs

📁 用AJAX做的一个在线求职系统
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class login_aspx : Page
{
    protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
    {
        //使用Membership静态类进行成员身份验证
        if (Membership.ValidateUser(Login1.UserName, Login1.Password))
        {
            //使用FormsAuthentication类的SetAuthCookie方法,将用户名存储于Cookies中,并根据在Login
            //控件中的选择决定是否使用持久性cookie
            FormsAuthentication.SetAuthCookie(Login1.UserName, Login1.RememberMeSet);
            //返回到请求的页面的URL.
            Response.Redirect(FormsAuthentication.GetRedirectUrl(Login1.UserName, Login1.RememberMeSet));
        }
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -