Validating date with rangevalidator control in
validation ignore if you not set a requiredfieldvalidator and user leave input field without entering any value.this example show you how can we validate date range using rangevalidator control.You can check ranges within pairs of numbers, alphabetic characters, and dates. Use the Control To Validate property to specify the input control to validate.The Minimum Value and Maximum Value properties specify the minimum and maximum values of the valid range, respectively.rangevalidator control force user to select a date from calendar control between a specified date range.The Range Validator does exactly what the name implies; it makes sure that the user input is within a specified range.Traditionally, Web developers have faced a tough choice when adding form validation logic to their pages.You can add form validation routines to your server-side code, or you can add the validation routines to your client-side code.
The Range Validator control allows you to check whether a user's entry is between a specified upper and lower boundary.
The validation result is then displayed on the page.
In this chapter, you learn how to use the Validation Web controls to validate the information that a user enters into an HTML form.
Now, try running the website, and enter a date in our new Text Box.
It's only valid if the date is within 2006, and a cool sideeffect is that the date is also checked for validity.
The advantage of writing validation logic in client-side code is that you can provide instant feedback to your users.