Control 'gvItemUpdate' of type 'GridView' must be placed inside a form tag with runat=server
The above exception occurs when one tries to export a GridView control to Word, Excel, PDF, CSV or any other formats.
Reason:
.NET compiler thinks that the control is not added to the form and is rendered.
Solution:
Tell compiler that the control is rendered explicitly by
overriding
the
VerifyRenderingInServerForm
event.
Something like:
public override void VerifyRenderingInServerForm(Control control)
{
}
This Error/issue reported & resolution suggested by MS here:
RenderControl doesn't work for GridView[
^]