我在做一个总后台管理,的登陆页面,有一段代码请大家帮忙解释一下:
string userID=BLL.AdminUser.login(tbn_user.Text,tbn_password.Text);
if(userID!="")
{
setPower(userID);
Response.Redirect("admin_menu.aspx");
}
else
{
this.Label1.Text="用户名密码错误!";
}

解决方案 »

  1.   

    //判断用户和密码是否正确,并返回用户ID
    string userID=BLL.AdminUser.login(tbn_user.Text,tbn_password.Text);
    //如果用户ID不为空,就执行setPower(),然后跳转到admin_menu.aspx,否则告诉用户错误
    if(userID!="")
    {
    setPower(userID);
    Response.Redirect("admin_menu.aspx");
    }
    else
    {
    this.Label1.Text="用户名密码错误!";
    }
      

  2.   

    这个: tbn_password.Text在哪用到的?