Introduction: in this artcile I will explain how to resolve
the problem Control 'grdstudent' of type 'GridView' must be placed inside a
form tag with runat=server when Export Data from Data controls i.e. Gridview,
Datalist etc.
Description:
In the last article i have explained A page can have only one server-side Form tag.
Error occur when we try to Export the Data from Controls to
Pdf, Excel, Word, CSV. To resolve this problem add one function:
public override void VerifyRenderingInServerForm(Control control)
{
/* Verifies that the control is rendered */
}
After adding this fuction in code behind the problem has
been resolved. It would solve you problem.
No comments:
Post a Comment