a.aspx 有两个txtname、txtpassword.传到 b.aspx 的两个txtname、txtpassword登录有好的方法吗?

解决方案 »

  1.   

    你可以Post给B.aspx
    也可以存Session
      

  2.   

    post Server.Transfor cookie session 
      

  3.   

    在A页面把值都存在session中,然后在B页面上取session中的值
      

  4.   

    a.aspx.cs
     
    Session["Name"]= txtName.Text;
    Session["Pwd"] = txtPasswork.Text;
    Response.Redirect("/Wab/Mylogin.aspx");b.aspx.cstxtName.Text = Request.QueryString["name"].ToString();txtPasswork.Text = Request.QueryString["pwd"].ToString(); 
      

  5.   

    1、url传参 
    b.aspx?txtname=..&txtpassword=...
    接收 
    string name=Request["txtname"];
    string pwd=Request["txtpassword"];2、form 传参a.aspx页面
    <form action="b.aspx" medthod="post">
    <input name="txtname" type="text">
    <input name="txtpassword" type="password"></form> 
    b.aspx.cs 接收 
    string name=Request.Form["txtname"];
    string pwd=Request.Form["txtpassword"];3、session
    4、cookie