"Control type 'GridView' must be placed inside a form tag with runat=server."while rendering control to string Or to get innerHTML in "DIV" from a server side.
Just paste this code in your Code Behind
public override void VerifyRenderingInServerForm(Control control) {}
The Explanation :
Asp.net calls VerifyRenderingInServerForm to ensure that every single server control is being rendered inside a <form runat="server"> tag. Which makes sense for a web page . We just want to send the Gridview contents to the client and not the Form tag.By Mohd Zulkamal
NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites. Thanks =)
0 comments:
Post a Comment