Response.AddHeader("content-disposition", "attachment;filename=" & strFilename & ".xls") Response.Clear() Response.Charset = "" Response.ContentType = "application/vnd.xls" Dim sw As System.IO.StringWriter = New System.IO.StringWriter() Dim htw As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(sw) grvData.AllowPaging = False grvData.AllowSorting = False PopulateGrid() grvData.RenderControl(htw) Response.Write(sw.ToString) Response.End()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)