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() 这样子接收数据吗?帮帮忙哦

解决方案 »

  1.   

    自己都有了想发为什么不自己测试下呢?至于前面两种方法没有规定只有asp才可以用的吧,在.net一样可以使用的
      

  2.   

    还是不太明白楼主的意思,如果不是系统的参数最好不要使用Session吧.用http://localhost/test/WebForm1.aspx?UserName='"+strName+"'就可以.
    个人意见..
      

  3.   

    if(Session["name"]!=null)
    name1=Session["name"].ToString();这样接收就行了
      

  4.   

    webform1:
    string a,b,c;
    a=X.Text;//
    b=a;
    webform2:
    如果要用到webform1中的数据只要webform1.b就可以了,试试吧,我是这样做的。
      

  5.   

    asp.net的语法跟asp本来就是很相似的。放在session中的数据,只要用这样的方法调用就可以了:
    if(Session["name"]!=null)
    name1=Session["name"].ToString();
      

  6.   

    1 session 
    赋值:  Session["xxx"]="dskfslfj";
    取值:   String kkk=Session["xxx"];
    http://localhost/test/WebForm1.aspx?UserName='"+strName+"'
    取值Request.QueryString["Username"].ToString()