ControlToValidate is mandatory property for all validation controls

Q.  Which is the mandatory property for all validation controls?
- Published on 24 Jul 15

a. ControlToValidate
b. Message
c. EnableClientScript
d. EnableServerScript

ANSWER: ControlToValidate
 

    Discussion

  • Raj Singh   -Posted on 14 Sep 15
    ControlToValidate is the mandatory property for all validation controls.
    Example:
    <asp: Textbox id="txtName" runat="server">
    ControlToValidate="txtName"
    ErrorMessage="Name is a required field."
    ForeColor="Red">

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.)