谁有关于 文件上传下载 的例子小弟有急用!!!谢谢!

解决方案 »

  1.   

    http://dotnet.aspx.cc/ShowDetail.aspx?id=58EA3515-36F2-4FD9-AC89-EAF49F59816C文件上传的一个例子,下载只要指定连接地址就可以了
      

  2.   

    上传很简单的!
    随便找个都可以的!下载的要支持中文文件名字:
    string Path=MapPath("")+"\\a.rar";
    Response.AddHeader("Content-Disposition","attachment; filename=" + HttpUtility.UrlEncode(Path,Encoding.UTF8)); 
    Response.WriteFile(Path); 
    Response.Flush();
    Response.ClearContent();
    Response.ClearHeaders();
    Response.End();
      

  3.   

    上传很简单的!
    随便找个都可以的!下载的要支持中文文件名字:
    string Path=MapPath("")+"\\a.rar";
    Response.AddHeader("Content-Disposition","attachment; filename=" + HttpUtility.UrlEncode(Path,Encoding.UTF8)); 
    Response.WriteFile(Path); 
    Response.Flush();
    Response.ClearContent();
    Response.ClearHeaders();
    Response.End();我试了一下老告诉我  找不到类型或命名空间名称“Encoding”(是否缺少 using 指令或程序集引用?)