What is Server Controls and its Types

What is Server Controls and its Types

In older days web development, programmers had to master the quirks and details of HTML before they could design a dynamic web page.

Pages had to be carefully tailored to a specific task, and the only way to add new content to a page was to generate raw HTML tags.

Server Controls

ASP.NET solves this problem with a higher-level model of Server Controls. These controls are created and configured as objects. They run on the webserver and automatically provides their own HTML output in a way that conceptually similar to the simple garbage.

Even better, server controls behave like their Windows counterparts by maintaining state and raising events that you can react in code.

Before you create a more complex page, it’s worth taking a step back to look at the big picture. ASP.NET  actually provides two sets of server-side controls that you can incorporate into your web forms. These two types of controls play subtly different roles:

Two Types of Server Controls

What is Server Controls, Two Types of Server Controls HTML SERVER CONTROLS WEB CONTROLS
Two Types of Server Controls
  1. HTML SERVER CONTROLS
  2. WEB CONTROLS
  • HTML SERVER CONTROLS

HTML Server Control are server-based equivalents for standard HTML elements. These controls are ideal if you’re a seasoned web programmer who prefers to work with families HTML tags. They are also useful when migrating ordinary HTML pages or classic ASP pages to ASP.NET because they require the fewest changes.

  • WEB CONTROLS

Web Controls are similar to the HTML Server controls, but they provide a richer object model with a variety of properties for style and formatting details. They also provide more events and more closely resemble the controls used for Windows development. Web Controls also feature some user interface element that has no direct HTML equivalent, such as the GridView, Claneder and Validation controls.

Thank you

 

Leave a Reply