i

ASP.Net A Complete Guide

HTML Server Controls

Server Controls:

Controls are the HTML tag those are created for providing the graphical user interface to achieve the rich UI. The controls are text boxes, radio buttons, dropdown lists, and many more. We can use those control for taking input, select attributes, display output, and a number of other operations as well. Controls are tags that understood by the server.

These three types of server control:

HTML Server Controls

HTML tag those are understood by the server called as HTML server control. When we add runat="server" attribute to the HTML element, then we called it an HTML Server Control.

All HTML server controls should be within a

tag, which should have the runat="server" attribute. The runat="server" attribute identifies that the form should be processed on the server.

Ex:-

Server controls provide the following features:

Automatic state management.

  • Simple access to object values without using an object.

  • Ability to generate server-side code for building a better-structured application.

  • An approach to build user interfaces for Web pages.

Advantages of server controls

  • It maps one to one with their corresponding HTML tags.

  • The controls with the runat=server attribute are compiled into the assembly.

  • When the ASP.NET page is reposted, the HTML server controls keep their values.

Few example of server control:

HtmlButton Control,HtmlForm Control,HtmlImage Control,HtmlInputButton Control,HtmlInputCheckBox Control