Download File From Server

Posted by .Netlearner under ASP.NET on 11/19/2012 | Points: 10 | Views : 988 | Status : [Member] | Replies : 2
Hello All,

In my code i have CSV File saved in the server. Once the CSV is saved in server through code i want my users to prompt for download with save/open / cancel dialog box . Can anyone please guide me? Its very urgent i tried the following code


Response.ContentType = "text/csv"
Response.AppendHeader("Content-Disposition", "attachment; filename=Test.csv")
Response.TransmitFile(Server.MapPath("~\CSV\Test.csv"))
Response.End()

But Stil It is not prompting the dialog box to the user whether to save\open. When i click the button the file is saved in the server and its getting downloaded automatically.How to solve this




Responses

Posted by: .Netlearner on: 11/19/2012 [Member] Starter | Points: 25

Up
0
Down
The above code is working in ie but its not working in chrome

.Netlearner, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sravya on: 11/20/2012 [Member] Starter | Points: 25

Up
0
Down
Hi..

Please Refer This below Link...It definitely Help for you..
http://rakeshbajania.wordpress.com/tag/csv-file-download-in-asp-net/

With Regards,
sravya

.Netlearner, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response