Free Web Development Online Tutorials, Learn to Code
Learn Aspx, Free Tutorial in C#, Web Application Development Guide Controls Examples

Controls are basically ready to use mechanism for building web application, they all are different in nature, and we can classify them based on behaviour or purpose

Broadly we can classify them in following categories
  • HTML Controls
  • Controls Server Side
  • Ajax Control
  • User controls
  • Custom controls

All Asp.Net controls comes under System.Web.UI.WebControls Namespace, Here are the quick overviews

  • Asp.Net Form Controls:
    Form control is used for designing form on web page. We can add both html control and control for data capture in side form control, in case of using html control we need to add runat=server property value , we normally place textbox, dropdown list, listbox, radio button, checkbox controls inside form control.
    This is how we define server side control
    <asp: textbox id=TextBox1 runat="Server" Text=" " text=" "> </asp:textbox>
    When we create a page in, the webform is created; we don’t need to write any additional form tag like HTML
  • Validation Controls
    Validation controls are used for validating user input; there are different types of validation control in application
    • RequiredFieldValidator
    • CompareValidator
    • RegularExpressionValidator
    • RangeValidator
    • ValidationSummary
    • CustomValidator
    All above validators are inherited from : BaseValidator class, These validation controls need support of jQuery to display error message on screen immediately
  • Master pages
    Master pages are very useful to make all application pages look similar; this is a type of template, very easy to use and helps maintaining consistency throughout the application
  • Data Controls
    There are many ready to use controls that allow dealing with collection of data, like displaying data, giving user an opportunity to manipulate data from UI, here are some popular data controls : DataGrid, Rrepeater, DataView, ListView, DataList
  • Navigation Controls
    Menu, TreeView, SiteMapPath
  • Login Controls
    Login, LoginView, PasswordRecovery, ChangePassword, CreateUserWizard
  • Ajax Control
    Ajax control comes with script manager and update panel, this allow us to create Ajax functionality, means anything we create within that panel, can make server side call without having any PostBack of entire page
  • User Control
    User control is a additional part which can have one or multiple controls with a fix set of functionality, can be easily integrated in any webpage, we can consider this as part of page, user control comes with .ascx file extension, we need to register on web page wherever we want to use them.
  • Custom Control
    Custom controls are type of control that is developed on demand by us (developer); custom controls are deployed as individual assemblies; Custom controls has same life cycle like any other server side controls in
    public class WelcomeCompositeControl : System.Web.UI.WebControls.WebControl, INamingContainer

    We can have multiple web controls in a custom control

Subscribe Server Side Controls Example