//-------------------------------------------------------------------------------------------------// protected void btnDownloadResults_Click(object sender, EventArgs e) { // Set the content type of the file to be downloaded Response.ContentType = Consts.StrRsp_ContentType_TextXml; // Clear all response headers Response.Clear(); // Add response header Response.AddHeader(Consts.StrRsp_Disposition, Consts.StrRsp_Attachment_ExperimentResultsXml); // // Retrieve all experiment results, convert to XML and write out // ExperimentResults experimentResults = new ExperimentResults(); string xmlExperimentResults = experimentResults.RetrieveAllToXml(); Response.Write(xmlExperimentResults); // End the http response Response.End(); }