Get it off your chest – be the first to comment on this video!
No text or picture Add-ons were added yet. How sad!
In the validation tab, these categories of controls are designed to make it easier for you to add validation to your website. The next lesson in the series actually dedicates itself to validation. So, I will not go into the details at this stage but we will just briefly discuss the various controls so that you can have an idea where we are heading. So first step, we have a control called Required Field Validator. If you add a Required Field Validator control to your webpage, you can associate that with a textbox for example and that means the user is required to enter a value in the textbox at one time. Otherwise, the webpage displays another message and that is a very important aspect in lots of web applications where you are trying to cover lots and lots of data from the user. You have to ensure that the user enters values in all the required fields so you would use one of these controls to ultimate the validation process. It makes it very easy indeed.
Sometimes, as well as they test in whether the users enter the value, you want to ensure that the value lies in a certain range and that is the purpose of the Range Validator Control. The Range Validator enables you to specify the set of allowable values from the user. So for example, you could specify a number between zero and a hundred to represent an exam mark or you might specify a date range. So for example, you might specify the date entered by the user. It must be after the 22nd of June and before the 3rd of October. Okay, Regular Expression Validator. This is quite cool. Regular Expressions enable you to specify a specific combination of characters. So for example, you might have a post code or zip code or a telephone number or an email address or Social Security Number. Each of these has specific rules about the character combinations that you allow to have. So, what you would do is to find a Regular Expression which represents the allowable combination of characters and just add that to your webpage. And, asp.net would then guarantee that the user enters data in the correct format. See, you do not have to do any complex text handling yourself. Let us call it a significant saving.
Okay, the next one, Compare Validator. This enables you to compare a textbox for example against either a fixed value or against another textbox. One of the most common uses of this is where you have some sort of login page where the user has to enter that password and maybe where they have to reenter that password and you need to ensure that the user enters the same password in both textboxes. So the easiest way to do that would just be to sort the little Compare Validator control on to your webpage and it would do it automatically for you. Okay, so if none of those give you the level of control you need, you can if you want to implement a Custom Validator. Custom Validator lets you like your own comparison logic, you can like the Claim side logic and you can like Service side logic so that the user gets a chance to validate that data without involving the round trip to the server. So let us see how to do that in the next lesson as well. Finally, we have a Validation Summary. The Validation Summary control presents a summary of validation areas at the bottom of the webpage typically to capture and display Rms Codes or in one convenient place to the user. Okay, so that is the list of validation controls.
Transcription by:
Scribe4you Transcription Services