try
{
CreateXML(TableA, TableB); //Call Create XML Method
}
catch (Exception e) { //Ex catch}
finally
{
Btn_Process.Enabled = false;
HttpContext.Current.Response.End();
Server.Transfer("Excel2XML.aspx");
}
string name = string.Format("attachment; filename=HDCLv1_NYC_{0:yyyyMMddHHmmss}.xml", DateTime.Now);
HttpContext.Current.Response.ContentType = "application/xml";
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;
HttpContext.Current.Response.BufferOutput = false;
HttpContext.Current.Response.AppendHeader("Content-Disposition", name);
using (XmlWriter writer = XmlWriter.Create(HttpContext.Current.Response.OutputStream, settings)) {
writer.Flush();
writer.Close();
HttpContext.Current.Response.Flush();
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.