HTML Server Control

HTML server controls are HTML tags that are understandable by the server.

HTML Server Control

HTML elements in ASP.NET files are processed as text by default. To make these elements programmable, the runat="server" attribute must be added to the HTML elements. This attribute indicates that the element should be treated as a server control.

Note:All HTML server controls must be within a <form> tag with the runat="server" attribute!

Note:ASP.NET requires that all HTML elements must be properly closed and nested.

HTML Server Control Description
HtmlAnchor Control the <a> HTML element
HtmlButton Control the <button> HTML element
HtmlForm Control the <form> HTML element
HtmlGeneric Control other HTML elements not specifically defined by HTML server controls, such as <div>.
HtmlImage Control the <image> HTML element
HtmlInputButton Control <input type="button">, <input type="submit">, and <input type="reset">
HtmlInputCheckBox Control the <input type="checkbox"> HTML element
HtmlInputFile Control the <input type="file"> HTML element
HtmlInputHidden Control the <input type="hidden"> HTML element
HtmlInputImage Control <input type="image"> HTML Element
HtmlInputRadioButton Control <input type="radio"> HTML Element
HtmlInputText Control <input type="text"> and <input type="password"> HTML Elements
HtmlSelect Control <select> HTML Element
HtmlTable Control <table> HTML Element
HtmlTableCell Control <td> and <th> HTML Elements
HtmlTableRow Control <tr> HTML Element
HtmlTextArea Control <textarea> HTML Element