Hi,
Based on my understanding, you want to export the GridView into Excel in your asp.net VB application. When you try to run it, you get the error message above. If I have misunderstood you, please feel free to let me know.
Sometimes, we can confirm that an HtmlForm control is rendered for the specified ASP.NET server control at run time using VerifyRenderingInServerForm method.
Please try to add the following code in your .aspx.vb file:
Public Overloads Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
End Sub
I hope this helps.