Print XML file and download it

Posted by Pankaj on Stack Overflow See other posts from Stack Overflow or by Pankaj
Published on 2010-03-15T07:04:40Z Indexed on 2010/03/15 7:09 UTC
Read the original article Hit count: 296

Filed under:
|

I am create xml using serialization and trying to print them using this code

 string xmlDate = xml.GetXML();

 string name = string.Format("{0}_HighEST", ProjectName);
 Response.AddHeader("Content-disposition", "attachment; filename=\"" + name + "_HighEST.xml\"");
 Response.ContentType = string.Format("application/.xml", name);

how can assign my xmldata to Response so that data will write on downloaded xml?

© Stack Overflow or respective owner

Related posts about Xml

Related posts about redirect