By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,870 Members | 1,212 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,870 IT Pros & Developers. It's quick & easy.

Force Download - XML problem

P: n/a
PJS
Thanks in advance.

I have a site which generates a user specific XML document. The user then
selects "Save to PC" which then forces the browser to show the
"save/download" dialog box. The code used is as follows:

Response.AddHeader("Content-Disposition", "attachment; filename=" &
fileName)
Response.ContentType = "text/XML"
Response.WriteFile(fileName)
Response.End()

fileName is an XML document such as myXMLDoc.xml

This works perfectly for later Operating systems such as Windows XP and
Windows 2000 ( SP2 but not where SP1 is installed). The dialog box
automatically recognises the file format as XML and saves the file
correctly.

Earlier Operating Systems fail to recognise the XML format and unless
manually altered, save the file as a gobbly-glock text file.

Is there a work around where I can force earlier systems to save an XML file
as an XML file without the user having to manually enter the save as
filename with the XML extension?

With Thanks,

Peter


Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.