Can you validate a usercontrol property with a CompareValidator?

Discussion in 'ASP .Net' started by Dave, Mar 25, 2008.

  1. Dave

    Dave Guest

    Is there a way to validate a usercontrol's property from the page hosting the
    control using a comparevalidator control? such as?

    <asp:CompareValidator id="cvStartDate" runat="server" ControlToValidate="how
    to reference a usercontrol's property here??"
    Operator="DataTypeCheck" Type="Date" ErrorMessage="Please enter a valid start
    date mm/dd/yyyy)." EnableClientScript="False">
    </asp:CompareValidator>
     
    Dave, Mar 25, 2008
    #1
    1. Advertising

  2. Dave

    bruce barker Guest

    no. use the CustomValidator instead.

    -- bruce (sqlwork.com)


    "Dave" wrote:

    > Is there a way to validate a usercontrol's property from the page hosting the
    > control using a comparevalidator control? such as?
    >
    > <asp:CompareValidator id="cvStartDate" runat="server" ControlToValidate="how
    > to reference a usercontrol's property here??"
    > Operator="DataTypeCheck" Type="Date" ErrorMessage="Please enter a valid start
    > date mm/dd/yyyy)." EnableClientScript="False">
    > </asp:CompareValidator>
     
    bruce barker, Mar 25, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neo
    Replies:
    2
    Views:
    7,897
    adamyang
    Nov 28, 2007
  2. Fabiano
    Replies:
    2
    Views:
    650
    =?Utf-8?B?c3Jpbmk=?=
    Jun 3, 2005
  3. cashdeskmac

    CompareValidator won't validate

    cashdeskmac, Nov 21, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    362
    cashdeskmac
    Nov 26, 2007
  4. Replies:
    3
    Views:
    3,806
    Arthur
    Jun 23, 2008
  5. TS

    controlToValidate property of compareValidator

    TS, Dec 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    217
    Steven Cheng[MSFT]
    Jan 3, 2006
Loading...

Share This Page