August 21, 2004

How to Open Save File Dialog

You must have given download file permissions in many or any applications. But it's getting problem because Doc/PDF/Txt files are opening in IE itself and user need to press save dialog from there.

Here is the tag that opens save file dialog to download file. Assume "testfile.txt" is getting download, so code will be :

Reponse.AppendHeader("content-disposition", "attachment; filename=testfile.txt");

This code will open a dialog box to save.

No comments: