不同页面之间的参数传递,若采用URL传递参数方法,有两种方法:
第一种:
send.aspx
<a href=receive.aspx?a=b></a>
receive.aspx.cs
string c = Request.QueryString["a"];
第二种:
send.aspx.cs:
protected void Button1_Click(object sender, EventArgs e)
{
Request.Redirect("receive.aspx?a=b");
}
receive.aspx.cs:
string username = Request.QueryString["username"];
|