Validating dates with comparevalidator in 2 0


13-Aug-2020 01:38

Since your goal is to compare textboxes in two separate naming containers, you are almost stuck. Write a custom validator but don't use the Control To Validate property.

In your evaluation function, you can write the code to locate each Text Box (either through a property on the User Control or using Find Control on the User Control).

Here are some ways to identify the user's culture: 1.

Create Specific Cul ture("[the Culture Name]") Please see the documentation for the Culture Info class to understand about Culture Names.

If these limitations concern you, you can use either the to compare the value of one form field against another form field.

The page in Listing 3.12 contains a meeting start date and meeting end date field.

Add properties on each user control that expose the string value from the textbox it contains.

Then put the Validation Property Attribute above the Class definition to point to that property. With the Validation Property Attribute, the Control To Validate and Control To Compare properties can get the text from your usercontrols. For example, you can assign controls in other naming containers.

validating dates with comparevalidator in 2 0-15

Free greece sex chatrooms

Try Parse() to check whether the date entered is legit.

Thanks The page sent to the browser only needs to handle the one date format of the user. But Compare Validator can only one date format at one time.