Posted on: 4/24/2015 4:38:02 AM | Views : 651

Hi Experts..

I have a Multiple Dynamically Created GridView inside Panel Control.. 
Please help me how to export to excel function.. as i tried my old code for exporting gridview to excel but now it does not work.
Thanks alot.
public void ExportToExcelFile(string filename) { // Clear response content & headers Response.Clear(); Response.ClearContent(); Response.ClearHeaders(); // Add header Response.AddHeader("content-disposition", "attachment;filename=" + filename + ".xls"); Response.Charset = string.Empty; Response.Cache.SetCacheability(System.Web.HttpCacheability.Private); Response.ContentType = "application/vnd.xls"; // Create stringWriter StringWriter stringWrite = new ...

Go to the complete details ...