GridView must be placed inside a form tag with runat=“server” even after the GridView is within a form tag Solution : You are calling GridView.RenderControl(htmlTextWriter), hence the page raises an exception that a Server-Control was rendered outside of a Form. add this code public override void VerifyRenderingInServerForm(Control control) { return; }

Comments

Popular posts from this blog