Response.Clear() Response.ClearContent() Response.ClearHeaders() Response.Charset = "" GenerateEvalReport() ' Generating the Table here and assigning to DIV.InnerHTML Response.AddHeader("content-disposition", "EvalReport.xls") Response.ContentType = "application/vnd.ms-excel" ' Response.ContentType = "application/ms-excel" -- Tried this also. Not Working Dim objRow As New HtmlTableRow Dim objCell As New HtmlTableCell objCell.Controls.Add(tblBody) ' 'tblBody'- Id of my Dynamic Table objRow.Cells.Add(objCell) table1.Rows.Add(objRow) ' Have one more Table as 'table1' table1.RenderControl(oHTMLTextWrite) Response.Write(oStringWriter.ToString()) Response.Flush() Response.End()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)