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可以得到传来的值。第二个就得不到呢还有传值的方法有哪些??
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可以得到传来的值。第二个就得不到呢还有传值的方法有哪些??
已经跳出页面了
少用session和cookie等会话
如果不用这两个,用什么可以实现这些功能呢?
换个形式这样也行:
string nextUrl = string.Format( "ShowInfo.aspx?userId={0}&zhiwu={1}",this.TextBox1.Text.ToString(), this.DropDownList1.SelectedValue );
Response.Redirect( nextUrl );