I have a DataGrid that I am trying to export when an ASP.NET Button is clicked.
The ex
I believe you just need to override the method that checks for a form. You don't need to add any logic to the method. Just add the following to your code behind:
public override void VerifyRenderingInServerForm(Control control) { }
ETA: You may also need to set EnableEventValidation="false"
in the <%@Page />
element.