Understanding ASP.NET HTML Server Controls
ASP.NET HTML Server Controls are the HTML controls that run at the server-side i.e. they have runat=server attribute. You can also have normal HTML controls in your ASP.NET page, but these controls will run only at the client-side. Therefore, using ASP.NET HTML Server Controls you can make full use of the .Net Framework utilities such as ViewState management and validation. ASP.NET HTML Server Controls must have the <form> tags enclosing them with runat=server attribute.
The ASP.NET HTML Server Controls that you can apply in ASP.NET page are as follows:
HTMLAnchor: Creates a server-side control that links to the <a> HTML element. The <a> element is used to create a link to another page. You can place an HTMLAnchor control within the HTMLForm control.
HTMLButton: Creates a server-side control button that maps to the <button> HTML element. This ASP.NET HTML Server Control has various methods to modify the appearance of an HtmlButton control. You can assign style attributes to the button, include formatting elements or assign property value. You can also include images within the button elements themselves, or even include other Web Forms controls.
HTMLImage: Creates a server-side control that allows you to view an image. In addition, you can set and retrieve the image's source, width, height, border width, alternate text, and alignment by using the Src, Width, Height, Border, Alt, and Align properties of this ASP.NET HTML Server Control. The HTMLImage control does not require a closing tag.
HTMLGeneric: Creates a server-side control for the HTML elements such as <body>, <div>, <span>, and <font>. This control links the tags of the particular element to be used as an HTML control to ASP.NET through the TagName property. This ASP.NET HTML Server Control has functionality of the HtmlContainerControl class, which allows you to dynamically change inner content of HTML control tags.
| Why should you go for Server Controls | Advantages of using .NET Server Controls | Understanding ASP.NET Server Controls | Creating Web Server Controls | Server Side Controls in ASP.Net | Creating Custom Server Controls | Server Controls in ASP.NET Web Page | Using Html Server Controls in your Web Pages | Understanding Dynamic Server Controls in ASP.NET | Using ASP Server Controls Templates | Developing ASP.NET Server Controls | Setting properties for ASP.NET Custom Server Controls | Implementing ASP.NET Server Side Controls | Creating Professional ASP.NET Server Controls |