Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • skiltz 501 posts 701 karma points
    Jun 23, 2009 @ 22:35
    skiltz
    0

    Usercontrol + Required Field Validator

    Just as a test I have a user control like so:

    <asp:TextBox ID="txtSoemthing" runat="server" />

    <asp:RequiredFieldValidator ID="rfvdwdw" ControlToValidate="txtSoemthing" runat="server" ErrorMessage="*" />

    When the page loads I get a jscript error "missing ; before statement" in ff and "Error expected ;" in IE.  Anyone else have RFV working in user controls?

    This is version 4.

    Thanks,
    Matthew

  • Bert 128 posts 251 karma points
    Jun 24, 2009 @ 12:32
    Bert
    1

    I would recommend checking your container placeholders in your templates. Do you have a server side form on your page?

    In FF you can use Tools > Error Console and then just click on the error to see the exact place of the error. That might help too.

  • Lee 1130 posts 3088 karma points
    Jun 29, 2010 @ 13:22
    Lee
    0

    I have just had the exact same error explained by Matthew above?  Using 4.0.4.1 and added a simple form with RequiredFieldValidators and now in my FireFox error console I get:

    Error: missing ; before statement
    Line: 208, Column: 4
    Source Code:
    var ctl00_ctl00_ctl00_ctl00_ContentPlaceHolderDefault_ChildContent_MainInnerContent_ctl01_find-a-specialist_3_Req1 = document.all ? document.all["ctl00_ctl00_ctl00_ctl00_ContentPlaceHolderDefault_ChildContent_MainInnerContent_ctl01_find-a-specialist_3_Req

    I'm using the out the box .NET controls?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies