HTML server controls in asp.net are HTML tags that the server can understand.
The HTML elements in the ASP.net file are processed by default as text. To make these elements programmable, you need to add the runat= "server" attribute to the HTML element. This property indicates that the element should be processed as a server control.
Note:
1. all HTML server controls must be in a label with the runat= "server" attribute!
2.asp.net requires that all HTML elements be properly closed and nested.
The HTML server space and related descriptions are shown in the following table:
HTML server Control |
Description |
HtmlAnchor |
Control <a> HTML Elements |
HtmlButton |
Control <button> HTML Elements |
HtmlForm |
Control <form> HTML Elements |
Htmlgeneric |
Controls other HTML elements that are not specified by the specific HTML server control, such as <body>, <div>, <span>, and so on. |
HtmlImage |
Control <image> HTML Elements |
HtmlInputButton |
Control <input type= "button" >, <input type= "Submit" > and <input type= "reset" > HTML elements |
HtmlInputCheckBox |
Control <input type= "checkbox" > HTML elements |
HtmlInputFile |
Control <input type= "file" > HTML elements |
HtmlInputHidden |
Control <input type= "hidden" > HTML elements |
HtmlInputImage |
Control <input type= "image" > HTML elements |
HtmlInputRadioButton |
Control <input type= "Radio" > HTML elements |
HtmlInputText |
Control <input type= "text" > and <input type= "password" > HTML elements |
HtmlSelect |
Control <select> HTML Elements |
HtmlTable |
Control <table> HTML Elements |
HtmlTableCell |
Control <td> and <th> HTML elements |
HtmlTableRow |
Control <tr> HTML Elements |
HtmlTextArea |
Control <textarea> HTML Elements |