Control xxx of type 'LinkButton' must be placed inside a form tag with runat=server

后端 未结 1 1717
粉色の甜心
粉色の甜心 2020-12-21 03:39

I have a DataGrid that I am trying to export when an ASP.NET Button is clicked.

\"error

The ex

相关标签:
1条回答
  • 2020-12-21 04:32

    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.

    0 讨论(0)
提交回复
热议问题