Validation unexpected behavior

Last post 04-14-2007, 2:11 AM by Adam. 6 replies.
Sort Posts: Previous Next
  •  11-06-2006, 10:41 AM 24076

    Validation unexpected behavior

    This works:

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
       
            <%  /*
            <asp:TextBox ID="txtTest" runat="server" />
            <asp:RequiredFieldValidator
                id="RequiredFieldValidator2"
                runat="server"
                EnableClientScript="true"
                ErrorMessage="RequiredFieldValidator"
                ControlToValidate="txtTest"
                Text="*" />
               
             */ %>
       
            <CE:Editor id="Editor1"
                runat="server"></CE:Editor>
            <asp:RequiredFieldValidator
                id="RequiredFieldValidator1"
                runat="server"
                EnableClientScript="true"
                ErrorMessage="RequiredFieldValidator"
                ControlToValidate="Editor1"
                Text="<h3>The body field is required!</h3>" />
            <asp:Button ID="btnTest"
                runat="server"
                OnClick="btnTest_Click"
                Text="Test" />
           
        </div>
        </form>
    </body>
    </html>

    But the page does postback.

    This validates the <asp:TextBox only:
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
       
            <asp:TextBox ID="txtTest" runat="server" />
            <asp:RequiredFieldValidator
                id="RequiredFieldValidator2"
                runat="server"
                EnableClientScript="true"
                ErrorMessage="RequiredFieldValidator"
                ControlToValidate="txtTest"
                Text="*" />
           
            <CE:Editor id="Editor1"
                runat="server"></CE:Editor>
            <asp:RequiredFieldValidator
                id="RequiredFieldValidator1"
                runat="server"
                EnableClientScript="true"
                ErrorMessage="RequiredFieldValidator"
                ControlToValidate="Editor1"
                Text="<h3>The body field is required!</h3>" />
            <asp:Button ID="btnTest"
                runat="server"
                OnClick="btnTest_Click"
                Text="Test" />
           
        </div>
        </form>
    </body>
    </html>

    The Editor is not validated.  What is the solution to this, thank you.


  •  11-06-2006, 4:00 PM 24086 in reply to 24076

    Re: Validation unexpected behavior

  •  11-07-2006, 2:49 PM 24123 in reply to 24086

    Re: Validation unexpected behavior

    I checked all available threads first and my code is a copy and paste of the sample code provided in your example. 
    A co-worker has confirmed this issue. 

    Thank you

  •  11-16-2006, 4:09 PM 24369 in reply to 24123

    Re: Validation unexpected behavior

    bump
  •  11-16-2006, 4:25 PM 24370 in reply to 24369

    Re: Validation unexpected behavior

    It appears .Enabled does not do anything.
  •  11-16-2006, 4:37 PM 24371 in reply to 24370

    Re: Validation unexpected behavior

    Enabled = false appears to make the last toolbar look disabled, but it still modifies the text in the editor.  The editor and the other toolbars are enabled.
  •  04-14-2007, 2:11 AM 28374 in reply to 24076

    Re: Validation unexpected behavior

    BurnChrome,

    Version 6.0 is out.  This issue is resolved in this new release.
     
    It's a free upgrade.
     
    Demo:

    http://richtextbox.com/cs/Validator.aspx

    Download:

    http://cutesoft.net/downloads/default.aspx

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML