Click here to Skip to main content
15,936,996 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all how to access save file dialogue box in asp.net
Posted

String FileName = "FileName.txt";
String FilePath = "C:/...."; //Replace this
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.ClearContent();
response.Clear();
response.ContentType = "text/plain";
response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ";");
response.TransmitFile(FilePath);
response.Flush();
response.End();
 
Share this answer
 
for basic concepts refer these 2 links

[^]
http://msdn.microsoft.com/en-us/library/sfezx97z%28v=vs.85%29.aspx[^]

this link will clear your all doubts about save file dialog ;)
C#

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900