Click here to Skip to main content
15,072,391 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing a web application. In this application a user can download a file stored in Sql Server. How i do it is that i show the list of files in a datagrid. When user clicks on a corresponding download link in gridview the file is read from database and written in a temporary file on web server disk. Then i write the below code to download the file on client side.

Response.ContentType = "application/pdf";

All works fine and the pdf file gets opened in browser on client side. But what i want to do is that the pdf file should not be opened in browser, i want to show a save file dialog option on the client side so that client can save file in his disk without being opened in web browser.

Thanks in advance for any response.
Updated 26-Nov-10 20:09pm

1 solution

This may help you:[^]
irfankhan200 27-Nov-10 3:22am
Thanks that realy worked.
Ankur\m/ 27-Nov-10 4:49am
4! I would have given you a 5 if you would have given a meaningful text to the link.

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