ASP.NET Force download of MS Word doc

My company uses Templates for all its correspondence. These are written in HTML/ASP.NET and when the user requests the page, it brings up a "Save or Open" Dialog box. When you click either, it opens MS Word as it should.

My Problem:
Even though I tell the page to output as Word useing the below code, when I click "Save As" it chooses HTML as the type. Also, if you simply save it where you wish, it creates a seperate folder for the additional files (As MS Word does when you save as a Web Page)

here is the code:Response.ContentType="application/vnd.ms-word"
Response.AddHeader ("content-disposition","attachment; filename=" & filename & ".doc")
Response.Charset = "UTF-8"Moved to .NET
 
Back
Top