protected void ExportCsvButton_Click(object sender, EventArgs e) { if (_Language != null) { string contents = LanguageManager.ExportResourcesCsv(_Language); Response.Clear(); Response.AddHeader("Cache-Control", "private"); Response.AddHeader("Pragma", "cache"); Response.AddHeader("Expires", "0"); Response.ContentType = "text/csv"; Response.AddHeader("Content-Disposition", "attachment;filename=Language_" + _Language.Name + ".csv"); // Flush the HEAD information to the client... Response.Flush(); Response.Write(contents); Response.Flush(); Response.Close(); } }