What is ASP.NET Web Forms?

ASP.NET Web Forms is a part of the ASP.NET web application framework. It is one of the three programming models you can use to create ASP.NET web applications, the others are ASP.NET MVC and ASP.NET Web Pages.

Web Forms are pages written using a combination of HTML, client-script, server controls, and server code. When users request a page, it is compiled and executed on the server by the framework, and then the framework generates the HTML markup that the browser can render. One of the key features of the Web Forms famework is that you can create layout of page by drag and drop server controls. You can then easily set properties, methods, and events for controls on the page or for the page iteself. These properties, methods, and events are used to define the web page's behavior and are defined in separate "code-behind" code file which can be written with C# or Visual Basic.

Key advantages and features

  • Compatible with any browser or mobile device. An ASP.NET Web page automatically renders the correct browser-compliant HTML for features such as styles, layout, and so on.
  • Compatible with any language supported by the .NET common language runtime, such as Microsoft Visual Basic and Microsoft Visual C#.
  • Built on the Microsoft .NET Framework. This provides all the benefits of the framework, including a managed environment, type safety, and inheritance.
  • Flexible because you can add user-created and third party controls.
  • Separation of HTML and other UI code from application logic.
  • A rich suite of server controls for common tasks, including data access, data binding.
  • Support for a variety of other capabilities, including routing, security, performance, internationalization, testing, debugging, error handling and state management.
  • It works well for small teams of web developers and designers who want to take advantage of the large number of components available for rapid application development.

Short answer

  • ASP.NET Web Forms is one of the three programming models you can use to create ASP.NET web applications.
  • ASP.NET Web Forms works well for small teams of web developers and rapid development because it incorporates a lot of predefined controls and features from ASP.NET; allows to build pages by drag and drop of UI controls.