Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Open Download File-Save-As dialog
Message
 
 
To
14/10/2009 02:31:39
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MySQL
Application:
Web
Miscellaneous
Thread ID:
01429311
Message ID:
01429451
Views:
33
I haven't tried it, but just came across this blog, which may be helpful

http://www.aspsnippets.com/post/2009/10/05/Using-ASPNet-AJAX-Control-Toolkite28099s-AsyncFileUpload-Control.aspx

>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();
> }
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform