Problem: Sometimes you can get "...must be placed inside a form tag with runat=server" error, when you deal with "asp:panel" or "asp:linkbutton" or whatever else scenarious when html form control needs to be rendered for the specified control at run time.
So, the code would look like the following (rendering asp:panel containing controls itself):
{
StringWriter stringWriter = new StringWriter();
HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);
contentPanel.RenderControl(htmlWriter);
string s = stringWriter.ToString();
Response.Write(s);
Response.End();
}
public override void VerifyRenderingInServerForm(Control control)
{
return;
}
1 comment:
Υour stylе iѕ unique іn comparіson tο otheг ρеoρlе I've read stuff from. Many thanks for posting when you'vе
got the oρρortunitу, Gueѕs І'll just book mark this page.
My website - transistors
Post a Comment