Response.Redirect("ShowInfo.aspx?userId="+this.TextBox1.Text.ToString()+"");

Response.Redirect("ShowInfo.aspx?zhiwu="+this.DropDownList1.SelectedValue+"");string UsersId;UsersId=Convert.ToString(Request.QueryString["userId"]);string back;back=Convert.ToString(Request.QueryString["zhiwu"]);this.TextBox1.Text=back;
            这样传值可以吗???为什么第一个response可以得到传来的值。第二个就得不到呢还有传值的方法有哪些??

解决方案 »

  1.   

    你可以用 & 把这 2 个值连起来传:Response.Redirect("ShowInfo.aspx?userId=" + this.TextBox1.Text.ToString() + "&zhiwu=" + this.DropDownList1.SelectedValue);然后再用你的方式接收之。传值的方式有 session,cookie,viewstate,url,form,transfer 几种.
      

  2.   

    Response.Redirect("ShowInfo.aspx?userId="+this.TextBox1.Text.ToString());
    已经跳出页面了
      

  3.   

    To: Run
     少用session和cookie等会话
    如果不用这两个,用什么可以实现这些功能呢?
      

  4.   

    楼上bflovesnow() 说的就可以了,
    换个形式这样也行:
    string nextUrl = string.Format( "ShowInfo.aspx?userId={0}&zhiwu={1}",this.TextBox1.Text.ToString(), this.DropDownList1.SelectedValue );
    Response.Redirect( nextUrl );