Set the EnableClientScript property to false - Validation Control and Web page navigation

Q.  Client-side validation is turned on by default. If you want that particular validation control should not validate at client side, what will you do?
- Published on 24 Jul 15

a. Set the EnableClientScript property to false
b. Set the validate property to false
c. Set the EnableClientScript property to true
d. Set the Page.Isvalid property to false

ANSWER: Set the EnableClientScript property to false
 

    Discussion

  • Raj   -Posted on 20 Oct 15
    you can disable client-side validation for any of the validation controls. For doing this assign the value False to the validation control’s EnableClientScript property.
    Example:
    < asp:RequiredFieldValidator
    id=”reqEmailID”
    ControlToValidate=”txtEmailID”
    Text=”(Required)”
    EnableClientScript=”false”
    Runat=”server” />

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)