Web Forms is one of three programming patterns for creating ASP.NET websites and web applications.

The other two programming patterns are Web Pages and MVC (Model View Controller Model-View-Controller).

Web Forms is the oldest ASP.NET programming model and is an event-driven web page that integrates HTML, server controls, and server code.

Web Forms are compiled and executed on the server, and the server generates HTML to display as a web page.

Web Forms - Events syntax

An event handler is a subroutine that executes code in response to a given event.

Web Forms - Events example

<%lbl1.Text="The date and time is " & now()%>
<html>
<body>
    <form runat="server">
        <h3><asp:label id="lbl1" runat="server" /></h3>
    </form>
  </body>
</html>