Web Form Introduction (entry must see)

xiaoxiao2021-03-06  43

Web Form Introduction Nikhil Kothari

Microsoft Corporation

September 2000

Summary: This article describes the ASP Framework - Web Form, which enables developers to create programmable pages to use them as part of all web applications.

table of Contents

Overview of HTML Control WEB Controls HTML Controls Comparing Web Controls Web Forms related to RAD Experience

Overview

Active Server Pages (ASP ) framework, also known as web forms, can be used to create programmable web pages to consist them as part of the overall web application. The web form simplifies the development of web applications in the following aspects:

Event-based programming mode is provided on the server, which is similar to the form-based development mode based on Microsoft Visual Basic® development systems. Allows the complete separation of HTML tags to the application logic. Logic, that is, the code after the page is compiled, so its performance is greatly improved. In addition, you can use any Microsoft® .NET language to write code, allow you to make more fully existing skills. Imprinted experience in a rich design. Visual Studio® .NET provides a Fast Application Development (RAD) feature for creating and managing Web forms. Supports a variety of rich, powerful controls and .NET component groups, providing unified, object models for type secure. In addition, the framework also makes itself naturally adapted to the need for expansibility by custom components or third party components.

This article will focus on the server controls that have been implemented as the framework. Other aspects of ASP , such as caching, security, configuration, and customization, are equally important. For detailed descriptions of these issues, you can find it in the "Developer Guide" section of the .NET SDK document.

Server controls are used to create a user interface for your web application. They can generate any output suitable for use in target devices or browsers. There are two groups of server controls in the ASP framework: HTML Controls, and "WEB Controls", which provide HTML for web browsers. In addition to providing HTML, they also encapsulate a mechanism for retention in the round trip and generate server-side events for various client events. At the same time, they can also be used as part of the composite control.

The following sections will be described in detail in detail.

HTML control

The first set of controls in the ASP frame is called the HTML control. These controls are located in the System.Web.ui.htmlControls namespace, which is directly or indirect from the HTMLControl base class. Figure 1 illustrates the class hierarchy of the HTML control.

Figure 1. ASP HTML control

For any tag containing the runat = "server" attribute, an instance of the HTML control is generated for it. For example, the following HTML can create an instance of HTMLInputText control called "TextBox1":

The HTML control and the corresponding HTML tag are listed in the table below.

Table 1. HTML control tag

Control marker corresponding HtmlAnchor HtmlButton