T
teeBull
Hi all,
We'd like to take advantage of code we already have for transforming
XML into HTML (using XSLT) for our users to save the HTML as an MS Word
document locally. I've dug around and found the following code to
include in the code behind:
Response.ContentType = "application/vnd.ms-word"
Response.AddHeader("Content-Disposition",
"inline;filename=someFile.doc")
As it is, the user gets the document and can open, save, or cancel with
the file dialog box. If s/he opens the document and then tries to
save, the default setting is to save with an HTM extension, which is
what we need to avoid. We want to ensure that the document gets saved
as a DOC file so I'd like to know if there's a way to force the user to
save the file locally (with a DOC extension) before viewing the
document. Any suggestions?
Thanks,
Anthony
We'd like to take advantage of code we already have for transforming
XML into HTML (using XSLT) for our users to save the HTML as an MS Word
document locally. I've dug around and found the following code to
include in the code behind:
Response.ContentType = "application/vnd.ms-word"
Response.AddHeader("Content-Disposition",
"inline;filename=someFile.doc")
As it is, the user gets the document and can open, save, or cancel with
the file dialog box. If s/he opens the document and then tries to
save, the default setting is to save with an HTM extension, which is
what we need to avoid. We want to ensure that the document gets saved
as a DOC file so I'd like to know if there's a way to force the user to
save the file locally (with a DOC extension) before viewing the
document. Any suggestions?
Thanks,
Anthony