Hi, i have a button which allows a user to download a file. WHen he presses the following code gets executed. And the Opn/Save/Cancel dialog is shown to him
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.ContentType = "application/msword";
string strFileName = "GenerateDocument" + ".xml";
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + strFileName);
//string htmlContent = DocGenerator.GetXMLDocument(this.id_ontlening);
HttpContext.Current.Response.Write("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
HttpContext.Current.Response.Write("<?mso-application progid=\"Word.Document\"?>");
XMLOntlening xmlOntlening = DocGenerator.GetXmlOntlening(this.id_ontlening);
XmlSerialize ...
Go to the complete details ...