Question: how to export gridview data to excel in asp.net using javascript?
Answer: The following HTML Markup consists of an ASP.Net GridView and an HTML Button. The Export Button has been assigned a jQuery click event handler. When the Export Button is clicked, the jQuery table2excel plugin is applied to the GridView's HTML Table and the GridView is converted (exported) to Excel file.