Re: Saving Downloaded Xml from ASPX page as File

From: Christopher D. Wiederspan (wiederspan_at_reachdigital.com)
Date: 09/09/04


Date: Thu, 9 Sep 2004 08:05:45 -0600

Got it! After further investigation, I stumbled across the
Content-Disposition header that you can set to force the Save As dialog box.
Worked like a charm.

Chris

"Christopher D. Wiederspan" <wiederspan@reachdigital.com> wrote in message
news:u0FszGnlEHA.2504@TK2MSFTNGP14.phx.gbl...
> I've got an ASPX page that simply builds an Xml document and does a
> Response.Write back to the client with that Xml, something like this:
>
> // Get the content as the Xml contained within the current working model
> string content = someDataSet.GetXml();
>
> // Write the response back to the user's stream
> this.Response.Clear();
> this.Response.ContentType = "text/xml";
> this.Response.Write(content);
> this.Response.End();
>
>
> Right now, this causes IE to just display the data in it's typical Xml
> incarnation - it's default behavior. My intention is that the user will
> recieve the Save As... dialog box and can save this Xml to a file on their
> machine instead of actually having to view it and manually use the
browsers
> Save As... menu item from the File menu. Part of the problem is that this
> Xml file is produced via a local Intranet and is fairly large (say 10 MB).
> When IE tries to actually parse and display the Xml, it takes forever.
>
> I'm wondering if there is some other ContentType value that might cause
the
> trigger the Save As dialog immediately...?
>
> Any ideas would be greatly appreciated.
>
> Thanks,
> Chris
>
>
>



Relevant Pages

  • Re: Anyone using Berkley XML DB w/Perl (of course)...?
    ... > Chris wrote: ... >> though an article I read on XML DB claims there is Perl support. ... I'd *really* like to play with this XML DB some... ... I'll download the Linux source and follow the lead I was given and see ...
    (comp.lang.perl.misc)
  • Re: writing xml files with a schema
    ... How would you place attributes of an element in the XML document??? ... Chris DeBoer wrote: ... >> To construct this in MATLAB, ... I can make a real nice schema in VS to verify my ...
    (comp.soft-sys.matlab)
  • Re: writing xml files with a schema
    ... How would you place attributes of an element in the XML document??? ... Chris DeBoer wrote: ... >> To construct this in MATLAB, ... I can make a real nice schema in VS to verify my ...
    (comp.soft-sys.matlab)
  • Re: [PHP] XML & HTTP
    ... Chris Shiflett wrote: ... >> I generated XML file. ... ways to send an XML file. ... is supposed to receive the XML document? ...
    (php.general)
  • Re: Adding XML payload to WordML document
    ... I did stumble accross a blog entry that Chris ... Kunicki had from Nov 2003 ... Document Variables! ... Is there any support for adding arbitrary XML into the ...
    (microsoft.public.vsnet.general)