Exemplo n.º 1
0
        //-------------------------------------------------------------------------------------------------//

        protected void btnDownloadStatistics_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_ExperimentStatisticsXml);

            //
            // Retrieve all experiment results, convert to XML and write out
            //
            ExperimentStatistics experimentStatistics = new ExperimentStatistics();
            string xmlExperimentStatistics            = experimentStatistics.RetrieveAllToXml();

            Response.Write(xmlExperimentStatistics);

            // End the http response
            Response.End();
        }