The HTML server controls are basically the original HTML controls but enhanced to enable server side processing. The HTML controls like the header tags, anchor tags and input elements are not processed by the server but sent to the browser for display.
They are specifically converted to a server control by adding the attribute runat="server" and adding an id attribute to make them available for server-side processing.
For example, consider the HTML input control:
<input type="text" size="40">
|
It could be converted to a server control, by adding the runat and id attribute:
<input type="text" id="testtext" size="40" runat="server">
|
Advantages of using HTML
Server Controls
Although ASP.Net server controls can perform every job accomplished by the HTML server controls, the later controls are useful in the following cases:
The following table describes the HTML server controls:
Control Name | HTML tag |
HtmlHead | <head>element |
HtmlInputButton | <input type=button|submit|reset> |
HtmlInputCheckbox | <input type=checkbox> |
HtmlInputFile | <input type = file> |
HtmlInputHidden | <input type = hidden> |
HtmlInputImage | <input type = image> |
HtmlInputPassword | <input type = password> |
HtmlInputRadioButton | <input type = radio> |
HtmlInputReset | <input type = reset> |
HtmlText | <input type = text|password> |
HtmlImage | <img> element |
HtmlLink | <link> element |
HtmlAnchor | <a> element |
HtmlButton | <button> element |
HtmlButton | <button> element |
HtmlForm | <form> element |
HtmlTable | <table> element |
HtmlTableCell | <td> and <th> |
HtmlTableRow | <tr> element |
HtmlTitle | <title> element |
HtmlSelect | <select> element |
HtmlGenericControl | All HTML controls not listed |