多多指教

解决方案 »

  1.   


    2.文件 上传
    <asp:FileUpload ID="FileUpload1" runat="server" />
    if (FileUpload1.HasFile)
    {
    FileUpload1.SaveAs(MapPath("~/UserFileHere/Image/" + FileUpload1.FileName));
    }
      

  2.   

    这个太普通的一功能
    http://developer.51cto.com/art/200907/140455.htm
      

  3.   

    这儿有一个,你照做,然后看看代码就可以了。
    http://www.cnblogs.com/gina/archive/2007/09/03/831360.html
      

  4.   


           //上传
            string fileName = FileUpload1.FileName;
           string filePath = Server.MapPath("dd/") + fileName;
           FileUpload1.SaveAs(filePath);
           //下载
            <a href="dd/11.doc" target="_self">下载</a>
      

  5.   

    csdn每天问的最多的就是上传 下载  - - 额
      

  6.   

    上传:
    前台页面:
    <asp:FileUpload ID="FileUpload1" runat="server" />
     <asp:Button ID="btnSave" runat="server" onclick="btnSave_Click" Text="保  存" />string fname=string.Empty;
                string filename=string.Empty;
                string docName = string.Empty;
                string docType = string.Empty;  if (FileUpload1.HasFile)
                {
                    fname = FileUpload1.PostedFile.FileName;
                    int f = fname.LastIndexOf("\\") + 1;
                    filename = fname.Substring(f);
                    FileUpload1.PostedFile.SaveAs(Server.MapPath("UpLoad\\" + filename));
                   // docName = System.IO.Path.GetFileNameWithoutExtension(filename);
                   // docType = System.IO.Path.GetExtension(filename).Substring(1, (System.IO.Path.GetExtension(filename)).Length - 1);
                    Response.Write("<script>alert('上传成功!');</script>");
    }
    下载:
    file="Upload/a.doc";
    if (File.Exists(Server.MapPath(file)))
                        {
                            Response.Redirect(file);
                        }
                        else
                        {
                            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('查看文件不存在!')</script>");
                        }
      

  7.   

    有现成的代码可以使用。直接下载下来集成到网页中。
    HTTP文件上传控件
    HTTP文件下载控件
    默认界面下载中下载完毕
      

  8.   

    不错,公司正在做一个项目,也需要实现文件上传和下载功能。ASP.NET的自带控件又不能够满足需求,Flash控件又不支持文件下载和文件夹上传功能。这个看着不错,能不能把地址发一下,谢谢。
      

  9.   

    网上有一个。Xproer.HttpUploader和Xproer.HttpDownloader
    http://www.cnblogs.com/xproer/archive/2010/10/24/1859895.html