ASP.NET上传文件的实例 http://www.chinabs.net/aspnet/default.asp?infoid=73

解决方案 »

  1.   

    //upload.aspx
    <input type="file" id="fileUpload" runat="server" />//upload.aspx.cs
    HttpPostedFile pFile = fileUpload.PostedFile;
    string filePath = ""; //文件保存的绝对路径
    pFile.SaveAs(filePath);
      

  2.   

    http://xml.sz.luohuedu.net/xml/Content.asp
      

  3.   

    http://expert.csdn.net/Expert/topic/2423/2423695.xml?temp=.6251642其中上传图片就是上传文件的做法
      

  4.   

    先在html页里加入<input id="UpLoadFile" type="file" runat="server">
    然后
    private void Button1_click()
    {string pic;
    pic="xxx";//路径
    UpLoadFile.PostedFile.SaveAs(Server.MapPath(pic));
    Image1.ImageUrl="pic";
    Image1.Visible=true;
    }