HBS.Data.Entities.TimeTracking.Models.ExportPage.Export C# (CSharp) Method

Export() private method

private Export ( string contentType, string data, string fileName ) : void
contentType string
data string
fileName string
return void
        private void Export(string contentType, string data, string fileName)
        {
            //EnableViewState = false;
            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.Buffer = true;
            HttpContext.Current.Response.ContentType = contentType;
            HttpContext.Current.Response.AddHeader("content-disposition", String.Format("attachment;filename={0}", fileName));
            HttpContext.Current.Response.Write(data);
            HttpContext.Current.Response.End();
        }