点radiolist某项目弹出新窗口B之后,如何把页面A form中的数据都取到页面B中使用?radiolist所在页面为A ,
弹出新窗口为B
页面A form action的指向页不是B,需要取得数据太多,Request.QueryString也不可行。急等,哪位指点一下,谢谢了。

解决方案 »

  1.   

    用javascript :
    opener.document.all.txtName
    ....
      

  2.   

    Transfer(目的页)
    radiolist的选择改变事件内把页面所要取得值存到一个自定义的public属性内,然后在下一页读取
      

  3.   

    Page A 
    string _strResource="";
    public string strResource
    {
       get{return _strResource;}
       set{_strResource=value;}
    }
    void radioList事件(sender, e)
    {
       this.strResource=你要取的值;
       Server.Transfer("B");
    }Page B
    void PageLoad(sender,e)
    {
       if(!IsPostBack)
    {
       A a=new A();
       Response.Write(a.Resource);
    }
    }
      

  4.   

    因为我没试,如果取不到值就把这句改成
    static string _strResource="";
      

  5.   

    谢谢红枫,我查了一下Server.Transfer方法,有如下描述
    That's not all: The Server.Transfer method also has a second parameter—"preserveForm". If you set this to True, using a statement such as Server.Transfer("WebForm2.aspx", True), the existing query string and any form variables will still be available to the page you are transferring to.For example, if your WebForm1.aspx has a TextBox control called TextBox1 and you transferred to WebForm2.aspx with the preserveForm parameter set to True, you'd be able to retrieve the value of the original page TextBox control by referencing Request.Form("TextBox1").照此来说,似乎直接在pageB用request方法就可以取得PageA的form对象的值而不用写一个public属性了,我也还没有测试。
    再次感谢,不知道是否还有其他的方法。 :)
      

  6.   

    to 红枫
    是否也能回答我的另外一个问题,谢谢了.
    http://community.csdn.net/Expert/topic/4230/4230820.xml?temp=5.102175E-02