New Message on MumbaiUserGroup

From: Swapnil_B1
Message 1 in Discussion

  Folks,   This seems to be a common question that we hear frequently: How do I 
download a file from a Web site, but instead of displaying it in the browser 
see it as a file that can be saved (ie. see the Save As dialog)?  
Normally when you link a file that file will always display inside of the 
browser because the browser loads it and automatically determines the content 
type based on the file extension. So when you click on a link like a jpg image 
the browser knows it's an image and will display that image. You can of course 
always use the browser short cut menu and use the Save Target As option to save 
the file to disk.  
If you want to do this automatically when a link is clicked from the server 
side, you have to send the file back yourself rather and add a couple of custom 
headers to the output. The way to do this is to use Response.Transmit() to 
explicitly send the file from your ASP.NET application and then add the Content 
Type and Content-Disposition headers.  
Check out this link for futher details and code snippet. 
http://west-wind.com/weblog/posts/76293.aspx   Swapnil (Swaps) 


To stop getting this e-mail, or change how often it arrives, go to your E-mail 

Need help? If you've forgotten your password, please go to Passport Member 

For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.

Reply via email to