Basic download question

  • Thread starter Thread starter Steve C. Orr [MVP, MCSD]
  • Start date Start date
This is not an ASP.NET specific question, more of a generic HTML question.
I want to provide users a link (or a button or some control) that they can
click on to download a file. The trick is that if it's a Word or Excel
document ans the user has Word or Excell install then the file just opens
up. How do I make it so that the file prompts to save and not open the
application?
 
Yes, the AddHeader statement in my original response specifies the filename
for the browser to use.
Make sure you're not outputting any HTML.
You could do a Response.Clear before the AddHeader statement to help ensure
that.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
 
Is there a header that can be sent that will cause the file save dialog to
default to the name of the file that is actually being downloaded and not
the name of the ASPX file that's streaming the file to the client?


--Buddy
 
Back
Top