Used to create a label. HtmlContainerControl generally use this class to create new labels.
Maybe we are familiar with System.Web.UI.WebControls; space. System. The Web.UI.WebControls namespace contains classes that allow you to create Web server controls on a Web page.
The most common is when you need to get each data when you use a data-bound control
When binding data:
Get this data in the background:
More go to mdsn inside to see it
Similar to this control is the System.Web.UI.HtmlControls namespace. The System.Web.UI.HtmlControls namespace contains classes that allow you to create HTML server controls on Web forms pages. One is a server-side control, one is an HTML control.
For example:
We create labels at the front desk.
varNewu = Document.createelement ("u"); //Create element newu.innerhtml="Custom Add"+ (parseint (Count) +1)+":"; //Set Text newdd.appendchild (NEWU); //Add this tab to the seat varNewspan = Document.createelement ("span"); varNewinput = Document.createelement ("input"); Newinput.setattribute ("placeholder","fill in the class capacity ..."); //Set properties, which can be used within the label Newinput.setattribute ("type","text"); Newinput.setattribute ("ID","txtlable"+Count); Newinput.setattribute ("name","txtlable"+ Count);
Create a label in the background
HtmlGenericControl div =NewHtmlGenericControl ("Div");//creating a tag base class requires writing the required type in the constructorDiv. Attributes.Add ("ID","1");//Setting PropertiesDiv. InnerHtml ="Test Text";//textHtmlInputText Test=NewHtmlInputText ("text");//strongly typedTest. Value ="Test 2"; Test.id="123"; Test. Name="456"; //This property is not valid div. Controls.Add (test); Page.Controls.Add (div);//Add the seat on the page
System.Web.UI.HtmlControls