Question

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?

Was it helpful?

Solution

rfvtxtAdd.Enabled = false;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top