The Web Forms classification comes under the ASP.NET web application framework.

 The Web Forms is one of the programming models that you can use to create interactive ASP.NET web applications.

The other models are as following:


•    ASP.NET Web Pages

•    ASP.NET Single Page Applications

What Is Web Form

  • A Web Form, or HTML form, is an online page that allows user input.
  • It is an interactive page, where users fill out particular fields.
  • Web forms are rendered in browsers using HTML and other web-oriented languages like CSS, javascript.

Processing of Web Form

  • Web Form Processing follows the Client-Server Architecture.
  • A client may be any machine or any device or any web browser.
  • The user requests information through a Web form.
  • A request sent to the server. The server finds the required information from the database.
  • Relevant information send to Client (Web Browser) in HTML format.


Web application programming helps to overcome the limitations of programming traditional client-based applications.

1.    Improved web user interface

It will be challenging to design and develop a user interface using basic HTML controls when the page has dynamic content and user-interactive objects.

2.    Client and server

 The request send from your client browser has to travel across the network to execute some server-side code and returns the appropriate response in HTML form through the web browser.

3.    Stateless

  • When a request for information sends using web page, the information on web page discarded after the request is processed once.
  • If the same page requested by the user, then the entire process repeats.
  • Information of pages is not saved at the server.
  • Pages are stateless.

4.    Client capabilities

Browsers like Chrome, Mozilla, etc., have different capabilities, it is challenging to create an application that will run equally well on all type of browsers.

5.    Complications with scalability

Using the existing method of Web Application, Scalability not found in an application for the different client due to the lack of compatibility between the various components of the application.

The Web Forms addressed these challenges in the following ways:

•    Consistent object model

•    Event-driven programming model

•    State management

•    Browser-independent applications

•    .NET Framework common language runtime support

•    .NET Framework scalable server performance


  • Client Script and Client Frameworks– ASP.NET Web Forms supports Client-Side scripting language like HTML, CSS, JavaScript, which enhances the server-based features.
  • Server Side Controls– When the web page requested server-side controls, the object on ASP.NET Web pages are rendered. Web server controls are similar to HTML elements, such as text boxes and buttons. Also, other controls like Calendar, Gridview, etc. are used to connect to data sources and display data.
  • Master Pages– Master page helps to create a consistent look and feel and standard behavior for other child pages.
  • Working with Data– ASP.NET provides different methods for storing, retrieving, and displaying data.
  • State Management– State management is a concept to use a value in various web pages and also in the overall application.
  • Routing– Web forms URL routing manages routing tables to maintain URLs.

Routing is used to define URLs that are semantically meaningful to users that can help with search engine optimization (SEO).

  • Security– ASP.NET Web Forms supports encryption and decryption for security on the network.
  • Debugging and Error Handling– Debugging and error handling is the feature within ASP.NET Web Forms that allows your applications to compile and execute effectively.
  • Deployment and Hosting– Visual Studio, ASP.NET, and IIS provide tools that help to deploy and hosting the Web Forms application.

Controls with their properties used in the Web Form

Following controls are used in ASP.NET Web Form:

  1. TextBox control
  2. Literal control
  3. Label Control
  4. Button control
  5. FileUpload control
  6. Image control
  7. ImageButton control
  8. ImageMap control
  9. PlaceHolder control
  10. HiddenField control

1. TextBox control

  • TextBox control is used to take input from the user.
  • Some properties of textbox control are Text, TextMode, ReadOnly,AutoPostBack etc .


2. Literal control

  • Literal control is used to show static data.
  • Some properties of Literal control are Text, Mode, etc.


3. Label Control

  • Label control is used to show some information to the user.
  • Some properties of Label Control are Text, Font, ForeColor, BackColor, etc.


4. Button control

  • Button control is used to fire an event and send a request to the Web Server.
  • Some properties of Button Control are Text, OnClientClick, Click, etc.


5. FileUpload control

  • FileUpload control is used to Upload the File on the Web Server.
  • Some properties of FileUpload Control are Visible, Tooltip, Height, Width, etc.


6. Image control

  • Image control is used to display the image on the web form.
  • Some properties of FileUpload Control are Alternate Text, ImageAlign, etc.


7. ImageButton control

  • ImageButton control is used to display the image on Button.ImageButton control that performs the same action as Button Control.
  • Some properties of ImageButton Control are AlternateText, Enabled, ImageUrl, etc.


8. ImageMap control

  • ImageMap control provides different kind of Hotspots (Like RectangleHotSpot, CircleHotSpot, PolygonHotSpot, etc.).
  • These hotspots allow the user to navigate to other web pages on clicking ImageMap.
  • Some properties of ImageMap control are ImageUrl, Enabled, Target, etc.

9. PlaceHolder control

PlaceHolder control is used to add controls like labels, text boxes, images, etc. dynamically at run time.

Some properties of PlaceHolder control are Visible,BackColor,ForeColor etc.

Code for aspx page

Code for .cs page

10. HiddenField control

  • The HiddenField control is used to store the value which is used in the background process of the web form and not shown to the user.
  • Some properties of HiddenField control are Value, EnableViewState, ViewStateMode, etc.

Code for aspx page

Code for .cs page


Pin It on Pinterest

Share This