Duration: 16 minutes
Summary: In this video, we will talk more about the CompareValidator. We can use the CompareValidator to compare the control we are validating against a specific value. That value is available in the ValueToCompare property. If this value is static, we can set this property in the validator control itself. But if the value is dynamic, we can set the ValueToCompare in the page_load event.
In addition to type validation, we can use the CompareValidator to compare a control with another control (for instance, we need to make sure that the end date is greater than the start date). As usual, we add the Type, ControlToValidate, and the Operator property. But since we are comparing two controls, we also add the ControlToCompare property..
Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.
Technology Used: ASP.NET and Visual Studio 2010
Keyword: ASP.NET 4, Visual Studio 2010, CompareValidator, ControlToValidate, Type, Operator, ControlToCompare, ValueToCompare











See the prices for this post in Mr.Bool Credits System below: