Serenity
Serenity

Reputation: 5098

In code behind how do I make a validator to not validate?

Like I have this validator on a TextBox:

<asp:RequiredFieldValidator ID="rfvtxtAdd" ValidationGroup="Update" ErrorMessage="*"
    SetFocusOnError="true" ControlToValidate="txtAdd" runat="server" />

I want to turn off this validation check in code behind. How do you do it?

Upvotes: 3

Views: 5678

Answers (1)

abatishchev
abatishchev

Reputation: 100308

rfvtxtAdd.Enabled = false;

Upvotes: 8

Related Questions