Pages

Saturday, August 15, 2009

Control 'ctl02' of type 'GridView' must be placed inside a form tag with runat=server

I was in a real pain this problem for a last 3 hours. At last I got the solution. There is a function named VerifyRenderingInServerForm(Control control) which in fact verifies all the controls. I have just override the function to not to verify. The override function looks like below

    public override void VerifyRenderingInServerForm(Control control)
    {
        return;
    }
 

now it is working fine.

1 comment: