If I have more than one asp.net server validator on the same control,
(Suppose that both of them can return false in a specific situation) and I want to display only one message (Except the validation summary),
How can I Achieve this goal and group the Text
property of all the validators that link to the same control?
If I Implement this situation I receive in the output the Text
attribute of each one of the validators...
Put these two validators control in seperated ValidationGroup
and create a new Custom Validator that checks these two validators controls with unified message.
protected void CustomValidator (object sender, ServerValidateEventArgs e)
{
e.IsValid = validator1.IsValid && validator2.IsValid
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With