If you are getting error: "Control 'gv_appt' of type 'GridView' must be placed inside a form tag with runat=server.", then
you need to place the following method in your code behind:
public override void VerifyRenderingInServerForm(Control control)
{
}
Click here[
^] for detail.