页面(default.aspx)protected void Button1_Click(object sender, EventArgs e)
    {
        Session["dataset"] = ds1;        Response.Redirect("Default2.aspx",true);
    }页面(default2.aspx) protected void Page_Load(object sender, EventArgs e)
    {
        DataSet ds1 = (DataSet)Session["dataset"];            Doc theDoc = new Doc();
            theDoc.Rect.Inset(30, 30);            theDoc.Page = theDoc.AddPage();
            int theID;            theID = theDoc.AddImageUrl("http://localhost/websupergoo/Default2.aspx");    }我运行的时候,http://localhost/websupergoo/Default2.aspx 页面中有dataset,可我把http://localhost/websupergoo/Default2.aspx放到internet explorer中的时候,却打不开这个网页,这个时候ds1为零,我试着用Server.Tranfer("Default2.aspx",true);在internet explorer中只能打开http://localhost/websupergoo/Default.aspx 的内容,可我需要http://localhost/websupergoo/Default2.aspx 的内容,有什么办法,能让我即转换页面,又能把值传过去,请大虾帮帮忙,只有这样,我才能把html存到pdf中,在线等,多谢!!!

解决方案 »

  1.   

    老兄啊!!
    你这是传的DataSet对象!!
    还没搞过呢!!
    关注!!
      

  2.   

    不要用Session保存大对象,尤其数据集
      

  3.   

    试着用session保存字符,结果还是一样,急!!!
      

  4.   

    页面传值干嘛非要用session,换个别的思路啊  
      

  5.   

    直接在新的页面在装载dataset,把条件传过去不就行了么?
      

  6.   

    换成了字符串,public void Page_Load(object sender, EventArgs e)
        {        String extent;
            String themen;
           
            if (String.IsNullOrEmpty(Session["Extend"].ToString()) || String.IsNullOrEmpty(Session["Themens"].ToString()))
            {
                extent = Request["extend"];
                themen = Request["Themens"];
            }
            else
            {
                extent = (String)Session["Extend"];            themen = (String)Session["Themens"];
            }
        }protected void Button1_Click(object sender, EventArgs e)
        {            Doc theDoc = new Doc();
                theDoc.Rect.Inset(30, 30);            theDoc.Page = theDoc.AddPage();
                int theID;
                theID = theDoc.AddImageUrl("http://localhost/lastone/Default2.aspx?extent=Session["(Extend)"]&themen=Session["(Themens)"]");            theDoc.Save(Server.MapPath("hahahtml.pdf"));
                
                theDoc.Clear();
        }
       theID = theDoc.AddImageUrl("http://localhost/lastone/Default2.aspx?extent=Session["(Extend)"]&themen=Session["(Themens)"]");
    这句话有错误,望各位帮帮忙!在线等!急!!!
      

  7.   

    theDoc.AddImageUrl("http://localhost/lastone/Default2.aspx?extent=Session["(Extend)"]&themen=Session["(Themens)"]"); 你这是传的什么啊?
    界定符都乱套了..
      

  8.   

    传查询条件,   没必要传dataset  
      

  9.   

    放入缓存中,传过去Key,跟据Key来获取它