Silverlight instance Tutorial-validation data validation opening

Source: Internet
Author: User
Keywords Data validation opening nbsp;
Tags application client control data data type data validation debugging example

Silverlight 4 Validation Validation Instance series

Silverlight instance Tutorial-validation data validation opening Silverlight instance tutorial-validation data validation underlying properties and event Silverlight Instance Tutorials- Validation data validation dataannotation mechanism and debugging techniques Silverlight Instance Tutorial-validation client synchronous data validation Silverlight instance tutorial-validation server-side asynchronous data validation Silverlight instance Tutorial-validation user submit data validation capture Silverlight instance tutorial –datagrid,dataform data validation and ValidationSummary Silverlight instance Tutorials- Custom Extended Validation class, validation framework summary and recommendations

Speak up validation verification function, I believe everyone is not unfamiliar, in the application, when the user interaction input, developers will add some validation code, this can effectively avoid the application of abnormal appearance, can also make the application of the error message clearly displayed in the client, conducive to abnormal positioning, It also enhances the user experience. Especially in commercial application projects, the use of the validation function, the data can be stored in the storage device before the format, as well as the content of the checksum, which also improves the security of the data store.

The following ASP.net validation control demo is the most common validation effect in traditional Web applications, including validation controls such as required Field Validator,range Validator.

Ajax Validation:

Silverlight also provides support similar to the ASP.net validation control, which includes a validation demo of data input in the Silverlight Toolkit open source project.

Simple Data Binding Validation:

ValidationSummary Control Demo:

To help you learn and master the validation features of Silverlight, I'll give you a detailed overview of Silverlight's validation functionality and will combine some examples to help you understand validation validation.

This series of application development environments are:

Windows 7 Ultimate English

Visual Studio Premium English

Expression Blend 4 Premium English version

Silverlight 4

Validation validation Overview

Validation, is the verification, the meaning of the checksum, usually occurs after the user enters the data, the verification judgment, confirms the user to enter the correct information. In the validation approach, we can simply understand validation from two validation types.

1. Syntax validation, which verifies the validation result of the current input data type by comparing the data type definition of the member;

For example, when an int type is defined, and the assignment is string, an error exception is returned and the control is validated, and the exception is retrieved to the client;

public int Zip {Get;set}

Syntax validation often occurs before data changes, and its representation is reflected in the UI;

2. Semantic verification, the validation type is to validate the current input data according to the specific data restriction code;

For example, to specify that a textbox must be entered, or to qualify a TextBox content length, or to control its input with a regular expression, the most typical example is validation of an e-mail address:

Semantic validation usually occurs after the data has changed, and its representation can be controlled by the developer and not necessarily reflected in the UI;

A simple data binding, exception capture validation sequence diagram, this article, do not plan to explain the diagram, I will explain the validation principle in the following example.

Here is a brief introduction today, followed by a few of the specific validation classes and examples to explain Silverlight validation applications.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.