Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Open Download File-Save-As dialog
Message
De
14/10/2009 02:31:39
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
How to Open Download File-Save-As dialog
Versions des environnements
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MySQL
Application:
Web
Divers
Thread ID:
01429311
Message ID:
01429311
Vues:
105
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();
}
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform