General information
Title:
How to Open Download File-Save-As dialog
Environment versions
Network:
Windows 2003 Server
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only