
  public partial class login : System.Web.UI.Page
  {
      //单击登录按钮 
      protected void btnSubmit_Click(object sender, System.EventArgs e)
      {
          if (Page.IsValid)
          {
  
              string userName = "";  //用户名
              string pwd = "";        //密码
              userName = txtUserName.Text.Trim();
              pwd = txtPwd.Text.【Trim】();
              string sql;
              //根据用户输入的用户名与口令动态组合成一个查询
              sql = "select count(*) from Users 【where】 UserName='" + userName + "' 【and】 Password='" + pwd + "'";
  
              int ret = DBHelper.【execScalar】(sql); //ret 查询返回的记录条数
  
              if (ret <= 0)  //如果没有返回记录     
              {
                  Response.Write("<script>alert(\"登录失败!用户名或密码错误!\")</script>");
              }
              else
              {
                  //把用户名存在Session["UserName"]中
                  【Session】["UserName"] = userName;
                  //转向Default.aspx页面
                  Response.【Redirect】("Default.aspx");
              }
          }
  
      }
      //单击注册按钮
      protected void lnkRegister_Click(object sender, System.EventArgs e)
      {
          Response.Redirect("Register.aspx");
      }
      //单击取回口令按钮
      protected void lnkGetpwd_Click(object sender, System.EventArgs e)
      {
          Response.【Redirect】("step1.aspx");
      }
      //单击重置按钮
      protected void btnReset_Click(object sender, System.EventArgs e)
      {
          txtPwd.Text = "";
          txtUserName.Text = "";
      }
  }

--答案--
   Redirect   where   execScalar   Session   Redirect