skip to content »

inbasys.ru

Vb net validating controls

vb net validating controls-16

He is a published author on several subjects including XML, the migration from Visual Basic 6 to VB. In this scenario, if an error occurs while performing validation on the user's computer, the application can directly display the error message on the page that the user is viewing without the page making a round trip to the Web server and then back to the user. NET, data validation was performed through scripts using either Java Script or VBScript.

vb net validating controls-34

For instance, since the validation occurs on the Web server, your application must post the Web page that the user is viewing back to the Web server for validation to occur.In addition, malicious users can subvert the validation process.Users with harmful intent may easily modify the validation script because it is contained in the source of the page that is sent to the user's computer.The data validation controls are shown in Figure 1 as they appear in the Visual Studio . To use it, you link the Required Field Validator control to another control, such as a textbox, and use it to determine if the linked control has a value entered into it or it is empty.If the linked control has a value entered into it, data validation will succeed.Furthermore, the data validation scripts are protected inside the Web server so they are not vulnerable to malicious user modifications.

In its efforts to improve Web development on the whole, Microsoft included in ASP. NET validation controls), which offer an exceptional solution to data validation. NET comes with five validation controls as well as a summary control. NET Web application renders the data validation controls on the user's computer as HTML elements based upon the selected Target Schema property.

The Run At="Server" attribute is required for all ASP. The Display attribute determines how space is reserved to display the validation control message if data validation fails. NET will allocate the space on the page when the page is rendered. Other possible values for the Display attribute are Dynamic and None. NET validation controls uses a script library called Web and implements Microsoft JScript functionality that is only supported by Microsoft Internet Explorer 4.0 and later versions.

A Display attribute value of Dynamic specifies that you don't want ASP.

The malicious user can then submit the modified script to the Web server with results that are different than what you, the developer, intended.

The alternative to processing data validation on the user's computer is to process it on the Web server.

Validating the information entered by users is an essential part of developing a professional Web-based user interface. NET validation controls use a combination of the benefits of traditional data validation. NET data validation controls process data validation on the Web server, but you can also optionally process data validation on the user's computer. Hence, if you configure the data validation controls to enable validation on the user's computer, the resulting HTML is browser-specific.