Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Open Download File-Save-As dialog
Message
From
14/10/2009 02:31:39
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
How to Open Download File-Save-As dialog
Environment versions
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MySQL
Application:
Web
Miscellaneous
Thread ID:
01429311
Message ID:
01429311
Views:
104
How to Open Download File-Save-As dialog, I found codes below ..but it doesnot work.. (it opens new window that contains unknown chars or garbage)..



private void openFileSaveAs()
{
String FileName = "DivisionData.pdf";
String FilePath = "~/Temp/";
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.Clear();
response.ContentType = "Application/pdf";
response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ";");
response.TransmitFile(FilePath + FileName);
response.Flush();
response.End();
}
Next
Reply
Map
View

Click here to load this message in the networking platform