通过a.aspx页面的按钮 弹出了b.aspx页面,并把b.aspx页面的数组想传到a.aspx,用什么方法比较好?

解决方案 »

  1.   

    可以使用session
    还可以使用js来传递。
      

  2.   

    用Session,用完后删除掉存储:
    Sessin["ob"] = 数组;取值:
    if(Session["ob"] == null || Session["UserID"] == "")
     {
        object = Session["ob"];
        Session.Remove("ob");
     }
      

  3.   

    用Session             ViewState
      

  4.   

    看你要传什么样子的东西过去的啊,
    比如一个id的话  你可以用response.redirct=b.aspx?id=2323这样的方法来做的啊
    比较麻烦的数据  那就就Session来做
    ViewState好象不可以的吧 ,只能在一个页面 里面做的,跳转了页面 怎么 还可以用 ViewState
      

  5.   

    jswindow.open('xx.xaspx')xxx.aspx
      document.parentwindow....
      

  6.   

    Session             
    ViewState
      

  7.   

    Session,ViewState 是对象容器,什么都可以放,放类,放DataSet。
    你只要不把.net FrameWork全部放进去就没问题
      

  8.   

    如果一个对象可以存放object,那还有什么不可以?
      

  9.   

    a.aspx:
    public class a : System.Web.UI.Page
    {   
        public Page_Load()
        {
        }
      
        public string[] arytest
        { 
            get
            {
                //Add code here.
            }
        }    private void Button1_Click(object sender, System.EventArgs e)
        {
            window.open("b.aspx");
        }
    }b.aspx:
    public class b : System.Web.UI.Page
    {  
        public Page_Load()
        {
            if (!IsPostBack)
            {
                a clsa = (a)Context.Handler;
                
                string[] arytest = clsa.arytest;
            }
        }  
    }