asp页面传参
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
方法一:Response.Redirect("Url")
页面:A
Response.Redirect("WebForm2.aspx?webName="+TxbName.Text+"."+TxbPwd.Text); 可接多个变量
或
string url;
url="anotherwebform.aspx?name=" + TextBox1.Text + "&email=" + TextBox2.Text;
Response.Redirect(url);
页面:B
request.QureyString["webName"]
方法二:Session
Session["webName"]= 变量<可以是任意类型>
变量<所对应的类型>=Session["webName"]
方法三:Application 用法同上 Session
第四种:Server.Transfer 对象“.”传参: 首先声明并封装变量
send<参数所在页面名称> d = Context.Handler as send<参数所在页面名称> ;
或
PreviousPage d = Context.Handler as PreviousPage ;
获取变量:b.被封装的变量名