Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Force Download - XML problem

Reply
Thread Tools

Force Download - XML problem

 
 
PJS
Guest
Posts: n/a
 
      07-18-2003
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






 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nike air force one, air force 1, air force one low cut, air force one abdul_razak@indiatimes.com Digital Photography 2 12-31-2008 04:29 PM
Nike Air Force Ones,Air Force One Air Force One-1 lky52193@gmail.com Computer Support 0 01-17-2008 04:40 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:46 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:34 PM
Re: Force File Download XML Problem Ken Cox [Microsoft MVP] ASP .Net 1 07-21-2003 05:46 AM



Advertisments