Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
82577 Points
15430 Posts
MVP
Jan 19, 2010 07:57 PM|LINK
Casper, I still get the Open/Save/Cancel dialog, which you also get with this code:
string fileName = @"Images\AG00011_.GIF"; string physicalPath = this.Server.MapPath(fileName); Response.Clear(); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment; filename=\"" + HttpUtility.UrlEncode(fileName) + "\""); Response.WriteFile(physicalPath); Response.Flush(); Response.End();
NC...
NC01
All-Star
82577 Points
15430 Posts
MVP
Re: Familiar with webclient.downloadfile method?
Jan 19, 2010 07:57 PM|LINK
Casper, I still get the Open/Save/Cancel dialog, which you also get with this code:
string fileName = @"Images\AG00011_.GIF";
string physicalPath = this.Server.MapPath(fileName);
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + HttpUtility.UrlEncode(fileName) + "\"");
Response.WriteFile(physicalPath);
Response.Flush();
Response.End();
NC...