我以前做好了一个页面(称old.aspx)是上传文件并对该文件进行处理的。
现在有另一页面(new.aspx)将要上传文件的数据包post过来。现在要在old.aspx页面得到new.aspx页面post过来的数据包后上传该文件,并进行处理。
请问在new.aspx页面如果将数据post到old.aspx页面。old.aspx页面如果接收这些数据。
小弟很急,在线等。谢谢!!

解决方案 »

  1.   

    .net 自带上传控件,httpPostedFiel
      

  2.   

    使用Server.Transfer 可能比较好一点,在new.aspx中public HttpPostedFile FileContent //存放文件数据
    {
      get
       ..
      set
      ..
    }
    使用:Server.Transfer("old.aspx");
    来调用old.aspx 页面
    在old.aspx 中
    private void Page_Load
    (object sender, System.EventArgs e)
    {
    //create instance of source web form
    NewWebForm theForm;//假设newpage的类名为NewWebForm 
    //get reference to current handler instance
    theForm=(NewWebForm )Context.Handler;
    HttpPostedFile thePostedFile=theForm.FileContent 
    }
      

  3.   

    试试 Server.Transfer("test2.aspx", true),
      

  4.   

    charles_y(难得糊涂) ( ) 所言正确,可采纳!
      

  5.   

    //***第一个页txtValue.value="zxp";
    //****第二个页面获取
    string strName=Request.Form["txtValue"].tostring();
      

  6.   

    谢谢大家,如果我我想用html的文件控件怎么实现呢?
      

  7.   

    谢谢大家,如果我我想用html的文件控件怎么实现呢?