TemplateControl.ParseControl Method
.NET Framework 3.0
Parses an input string into a Control object on the Web Forms page or user control.
Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The following code example demonstrates how to create a Button Web server control using the ParseControl method, and then adds the result to the ControlCollection collection of a PlaceHolder Web server control named myPlaceholder.
void Page_Load(Object sender, System.EventArgs e)
{
Control c = ParseControl("<asp:button text='Click here!'"
+ " runat='server' />");
myPlaceholder.get_Controls().Add(c);
}//Page_Load
Community Additions
ADD
Show: