protected void Page_Load(object sender, EventArgs e)
{
string username = Request.Form["UserName"];
string userpass = Request.Form["UserPass"];
T_User user = UserManager.loginpassword(username, userpass);
if (user != null)
{
Session["user"] = user;
Response.Write("1"); //登录成功
Response.End();
}
else
{
if (UserManager.OnlyOne(username) >= 1)
{
Response.Write("2"); //密码不正确
Response.End();
}
else
{
Response.Write("3"); //用户名不存在
Response.End();
}
}
}
您可能感兴趣的文章: