Exemplo n.º 1
0
 protected void ButtonClear_Click(object sender, EventArgs e)
 {
     TextLogName.Text  = "";
     TextPassword.Text = "";
     LabelErrMsg.Text  = "";
     TextLogName.Focus();
 }
Exemplo n.º 2
0
 protected void GridViewUser_DataBound(object sender, EventArgs e)
 {
     if (GridViewUser.Rows.Count > 0) //账户名密码正确
     {
         //记录下账户名,以便传入调用的页面
         Session["AdminName"] = TextLogName.Text.Trim().ToString();
         //验证通过,调用主页
         Response.Redirect("AdminManage.aspx");
     }
     else
     {
         LabelErrMsg.Text  = "账户名或密码名错,请重新输入!";
         TextLogName.Text  = "";
         TextPassword.Text = "";
         TextLogName.Focus();
     }
 }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     TextLogName.Focus();
 }