I have created a Custom widget in which i am trying to export some data into Excel sheet. For this i have used a method to render gridview as html by following the instructions shown in the link below:
But as our Custom widget is a user control we can not override VerifyRenderingInServerForm
() which is a member of Page class.
If i use the code without overriding VerifyRenderingInServerForm()
function I get the following error:
" GridView must be placed inside a form tag with runat=“server”.
As there is already a default Form tag in sitefinity. If i try to add server side Form tag using any method i get the following Exception:
" A page can have only one server-side Form tag .
Please suggest anyway to Export data to Excel while using Custom sitefinity widget.
Any help will be appreciated.