1 session["s"]=value on the other pager value=Session["s"]
2 页面跳转是传递 src="nextpage.aspx?a='1'" on the other pager Request.QueryString["a"].ToString()两种方式:第一种就像上面那样http://localhost/test/WebForm1.aspx?UserName='"+strName+"';第二种是将你要传的参数存到Session里,如Session["username"]=strName.在传入的那个页面取值strName2 = Session["username"]
这些代码不是asp的吗?
this.Session.Add(this.nameTextBox.Text,name);
那在另一个页面怎么接收数据啊
Request.QueryString["name"].ToString() 这样子接收数据吗?帮帮忙哦
2 页面跳转是传递 src="nextpage.aspx?a='1'" on the other pager Request.QueryString["a"].ToString()两种方式:第一种就像上面那样http://localhost/test/WebForm1.aspx?UserName='"+strName+"';第二种是将你要传的参数存到Session里,如Session["username"]=strName.在传入的那个页面取值strName2 = Session["username"]
这些代码不是asp的吗?
this.Session.Add(this.nameTextBox.Text,name);
那在另一个页面怎么接收数据啊
Request.QueryString["name"].ToString() 这样子接收数据吗?帮帮忙哦
个人意见..
name1=Session["name"].ToString();这样接收就行了
string a,b,c;
a=X.Text;//
b=a;
webform2:
如果要用到webform1中的数据只要webform1.b就可以了,试试吧,我是这样做的。
if(Session["name"]!=null)
name1=Session["name"].ToString();
赋值: Session["xxx"]="dskfslfj";
取值: String kkk=Session["xxx"];
http://localhost/test/WebForm1.aspx?UserName='"+strName+"'
取值Request.QueryString["Username"].ToString()