hello everybody i am using c# .net in my webapplication. i have a method for export gridview data to excel name ExportToExcel(). in this method i use response.contenttype, response.clear(),response.write(),stringwriter,htmltextwriter methods. this method work fine and export data correctly. but when i write button1.visible = false above that method call then button does not unvisible. Means i write the following
button1.visible = false; // both not work on runtime panel1.visible = false; // ExportToExcel()
another problem is that after call ExportToExcel() method if i click on any button on my webpage then ExportToExcel() again call and shows dialog box to save and open excel file.
so please help me how to solve this problem I m unable to send code due to company rules so please help me
Thank to all in advance