'asp.net filedownload'에 해당되는 글 1건

  1. 2010/04/02 visualp asp.net file download

asp.net file download

C# RSS Icon ATOM Icon 2010/04/02 09:18 visualp
[원문] - http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=320

<%@ Page language="C#" debug="true" %>
<script language="C#" runat="server">
private void Page_Load(object sender, System.EventArgs e) {
Response.ContentType="application/zip";
Response.AppendHeader("Content-Disposition","attachment; filename=myzipfile.zip");
Response.WriteFile(@"c:\inetpub\wwwroot\myzipfile.zip");
Response.Flush();
}
</script>

N.B. Reader Shaun College added the following to chop off the extra junk that may be sent by the ASP.NET runtime along with your file:

Response.AddHeader ("Content-Length", FileSize.ToString());
2010/04/02 09:18 2010/04/02 09:18
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/229

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/229