The RequiredFieldValidator control is used to ensure that users have filled out those input controls that must be entered. The RangeValidator control is used to check the content of the user input within the effective range. This is very useful for the input content of numbers or date types. The CompareValidator control is used to compare the input content in one control and the input content in another control. The RegularExpressionValidator control is capable of checking whether the content entered by the user is compliant as a standard specification expression (or string mode). The CustomValidator control allows you to provide custom server-side and client-end authentication logic. The ValidationsumMary control provides an outline of all error messages generated by the validation control.
Zero-shaped control
The ADROTATOR control is used to display an ad or banner. Advertising information (including the URL of its image) uses an XML file to define:
asp: adrotator>
Comparison of HTML Controls and Web Controls
When developing these controls, we ask yourself if you really need to provide HTML control groups and web control groups with some repetition functions. You must also want to know what the HTML controls and web controls are exactly, and their applicable occasions. The difference between the two sets of controls can be compared by the following aspects.
Abstract control
The HTML control does not have any abstract capabilities. Each control is a one or one (see Table 1). The web control creates a higher level of abstraction, which does not have any corresponding HTML tags (such as Calendar and DataGrid). Because they are not directly mapped to HTML tags, the web control can also function as a merge function in an appropriate occasion (for example, with a TextBox control instead of multiple tags). This abstraction opens a convenient door to use a variety of types of controls provided by third parties.
Object model
The HTML control provides an HTML-centric object model. Each control includes a property set that can use this property set to control the properties of the tag. This property set uses the character string / value pair and is not strong. When using an HTML control, your programming is programs with traditional ASPs. Thus, the HTML control provides a quick transplant path - can convert a tag into a server control by adding a runat = "server" property. The web control provides a form-based, similar to Visual Basic programming mode. They also provide properties set, but their main goal is to provide a format, type safe and consistent object model. Each web control contains a set of standard properties, such as Forecolor, Backcolor, Font, etc. This object model also provides a richer design experience in design tools like Visual Studio .NET.
Target browser
The HTML control does not automatically detect the ability of the browser that requests the page, nor does it modify the HTML they provide. When using this set of controls, you are responsible for ensuring that your page works at the high-level and low browsers at the same time. The web control can automatically adjust the results they generate to ensure that the output results are equally excellent in advanced browsers and low browsers. Web controls can also provide different behaviors for different browsers to give full play to the potential of the browser. For example, the Validation control can also create a highly interactive page for advanced browsers through the client's script.
Control of generated HTML
The HTML control allows you to fully control the displayed content and the content sent to the client browser. Web controls offer a more abundant object model, as well as the ability to adapt to a variety of browsers. Thus, they do not provide the same degree of control over the output result.
When you develop web applications, you can choose from the ability of the two sets of controls and your needs. You can also choose to mix the two sets of controls on the same page, using a type of control does not hinder your use of another type of control.
Web Forms and RAD Experience
Web Forms and Server Controls provide the same quick program development (RAD) experience for web pages and applications.
The upcoming Microsoft Visual Studio.NET will include Web Form Designers, Visual Basic, and Visual C ® (especially C #) will also share this designer. It provides a Form-based efficient programming mode for Visual Basic developers. Figure 3 shows various aspects of the Web Form Design Experience.
Figure 3. Visual Studio.NET Web Form Designer
The toolbox allows the visible components such as the control, as well as invisible components like data sets and other server components, and drag and drop on to the design workbench.
The design workbench can display the control on the page in the way you see. The designer also has a associated background code window that can create and edit the logic behind the page in this window. By double-creating components and controls, you can travel to the corresponding code in this background code window. Property Browser enables you to customize components on the design workbench. Solution Explorer (Solution Browser) and Projects are used to manage and deploy components, pages, background code files, and other content files that appear in your web application.
This development environment also includes a refurbished debugger to help you easily debug web applications.
Reference
The .NET SDK contains the reference documentation of all the above controls, which describes the related classes, properties, methods, and events.
A large number of examples are also available in the form of "Quick Starts" to demonstrate applications for these controls on the web page.
In addition, there are some articles in the MSDN Library to discuss some of these controls:
Use the ASP list Binding Control (English) to introduce the REPEATER, DATALIST, and DATAGRID controls and discuss a lot of background concepts. Use the ASP DataGrid control to create a main view / detail view (English) discusses the various features of the DataGrid control. User Enter Authentication (English) in ASP describes the verification system in ASP , and the validation control described in this article.
The iBuyspy application example is an example of a web application in a real world that can view the program by accessing http://www.ibuyspy.com. It demonstrates how to create a full-service shopping site in all aspects of ASP , and also contain in-depth technical explanations.