62,046
社区成员
发帖
与我相关
我的任务
分享
<authentication mode="Forms">
<forms name="txqLogin" protection="All">
protected void btnSubmit_Click(object sender, EventArgs e) {
if (!Page.IsValid) return;
if (FormsAuthentication.Authenticate(txtUserName.Text.Trim(), txtPassWord.Text.Trim())) {
FormsAuthentication.RedirectFromLoginPage(txtUserName.Text.Trim(), true);
Response.Redirect(FormsAuthentication.DefaultUrl);
}
else {
labMsg.Text = "用户名或密码错误";
}
}