Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

ASP.net Regex Validator problem

  • 16-10-2009 11:05am
    #1
    Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭


    I'm come across a bug in the .net regular expression validators and would appreciate any suggestions as to how to get around it.

    To reproduce, setup a Regex validator to validate a textbox. Open the page in Firefox and enter a valid value. Click submit or perform a postback so the value is saved in the textbox history.

    Reload the page, and start typing the same value again. Firefox presents you with the same value from autocomplete/textbox history.

    If you select this value with the mouse, everything is fine. However, if you select with the arrow keys & press enter, the validator is incorrectly triggered. If you try to postback, the validator will disappear.

    It seems to me that the validator is triggered by the enter key, and only takes the values you typed rather than the full value you selected from autocomplete.

    I cant see a way around this other than to write my own client side regex validator. Any suggestions?

    Thanks :)


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Is their an autopostback property set to true that should perhaps be set to false? Probably a default submit button or something.


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    Yes there is, we have added client side script to handle an the Enter key being pressed. Thanks :o


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Can you edit your original post as set it to [Solved]? thanks.


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    Evil Phil wrote: »
    Can you edit your original post as set it to [Solved]? thanks.

    I would if I could, but there's no edit option


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    s'cool, I did it for you. The post was probably to old for you to edit.


  • Advertisement
Advertisement