Force Download - XML problem

P

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top