Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different popups for downloading files

Status
Not open for further replies.

tshad

Programmer
Jul 15, 2004
386
US
I am setting up a generic downloader using an httphandler to download files.

I noticed that depending on what type of header I use I get a different popup.

Code:
         if (view)
         {
            response.AddHeader("content-disposition", "inline; filename=" + filename);
         }
         else
         {
            response.AddHeader("content-disposition", "attachment; filename=" + filename);
         }
         response.ContentType = GetContentType(filename);
         response.WriteFile("~/App_Data/" + filename);

These are really both attachments, as far as I can see. Both allow you to open, save and "save as" your files.

But in the "inline" version, you get a modal popup in the middle of the page. If you do the "attachment", you get a popup at the bottom of page which is attached to the page (it moves as you move the page but stays on the bottom) and it is not modal.

Why the different types of popups?

Thanks,

Tom
 
This behavior is IE. In Chrome, it only does a save. Doesn't give you an option to open or "save as".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top