Results 1 to 3 of 3

Thread: RegularExpressionValidator

  1. #1

    Thread Starter
    Fanatic Member wildcat_2000's Avatar
    Join Date
    Nov 2000
    Location
    Italy
    Posts
    727

    Resolved RegularExpressionValidator

    hello,

    i'm using a RegularExpressionValidator in a form which works fine in IE, however in netscape instead of displaying the dialog box it just reloads the page.

    I use:
    Code:
    <form runat="server">
    <asp:TextBox class="edittext" id="Title" runat="server" size="57" MaxLength="150"></asp:TextBox>
    
    <asp:RegularExpressionValidator id="ValidateTitle" runat="server" ValidationExpression="[\w\s-']+" Display="Dynamic" ControlToValidate="Title" ErrorMessage="Only alphanumeric characters please."></asp:RegularExpressionValidator>
    
    <asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" Display="Dynamic" ControlToValidate="Title" ErrorMessage="Do not leave title empty."></asp:RequiredFieldValidator>
    
    <asp:ImageButton id="Save" runat="server" Width="16px" Height="16px" alt="Save" ImageUrl="images/icon_save.gif"></asp:ImageButton>
    </form>
    ...what am i doing wrong?
    Last edited by wildcat_2000; Oct 29th, 2004 at 03:28 AM.
    When your car breaks down,
    close all windows and retry

    => please rate all users posts! <=

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    The .Net validators do not support client-side validation for Netscape or Mozilla.. in fact the only one they work on is IE.

    This means you will not have a dynamic display when the user leaves the field.

    The next framework due in April will supposedly include support for the other browsers.

  3. #3

    Thread Starter
    Fanatic Member wildcat_2000's Avatar
    Join Date
    Nov 2000
    Location
    Italy
    Posts
    727
    thank you nemaroller.

    this is the best possible reason ever for me not to consider even touching to .net form validators and keep on using pure javascript code.

    cheers,

    wc.
    When your car breaks down,
    close all windows and retry

    => please rate all users posts! <=

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width