RequiredFieldValidator Control Bug?

Discussion in 'ASP .Net' started by Arpan, Jul 28, 2006.

  1. Arpan

    Arpan Guest

    Suppose I have the following RequiredFieldValidator control which
    validates a TextBox:

    <form id="form1" runat="server">
    <asp:TextBox id="txtVal" runat="server"/>
    <asp:RequiredFieldValidator id="reqVal" ControlToValidate="txtVal"
    ErrorMessage="Please enter a value in the TextBox!" Display="Dynamic"
    runat="server"/>
    <asp:Button id="but1" Text="SUBMIT" runat="server"/>
    </form>

    Now IE6 has this auto-complete feature which drops-down a list of
    similar values which were previously entered in the TextBox that
    currently has the focus as & when some text is being typed in that
    TextBox.

    Suppose I type the text "466" (without the quotes) in the TextBox &
    press the Tab key on the keyboard. Without submitting the Form, I shift
    the focus back to the TextBox & delete the text i.e. make the TextBox
    empty. Next when I press the Tab key again, the RequiredFieldValidator
    promptly displays the error message.

    Again without submitting the Form, I shift the focus back to the
    TextBox & press 4 on the keyboard. IE's auto-complete feature
    drops-down a list which lists 466. If I type "466" (again without the
    quotes) manually from the keyboard & press the Tab key, the error
    message, as expected, disappears but instead of manually typing 466, if
    I populate the TextBox by clicking 466 from the auto-complete drop-down
    list that IE shows & then press the Tab key, the error message still
    remains as it is though the TextBox is no longer empty now; it has been
    populated with 466.

    Is this some sort of bug in the RequiredFieldValidator control?

    Thanks,

    Arpan
     
    Arpan, Jul 28, 2006
    #1
    1. Advertising

  2. This might actually be more of an IE bug than a bug in the validation
    control, but that's not likely to be of much help to you. <g>

    The underlying problem is that IE is not firing the onchange event when an
    item was selected from the previous entries list in the way you describe.
    The client-side code for the validation controls could possibly work around
    this by using the onblur event, so it might be worthwhile to report the
    issue at http://connect.microsoft.com.


    "Arpan" <> wrote in message
    news:...
    > Suppose I have the following RequiredFieldValidator control which
    > validates a TextBox:
    >
    > <form id="form1" runat="server">
    > <asp:TextBox id="txtVal" runat="server"/>
    > <asp:RequiredFieldValidator id="reqVal" ControlToValidate="txtVal"
    > ErrorMessage="Please enter a value in the TextBox!" Display="Dynamic"
    > runat="server"/>
    > <asp:Button id="but1" Text="SUBMIT" runat="server"/>
    > </form>
    >
    > Now IE6 has this auto-complete feature which drops-down a list of
    > similar values which were previously entered in the TextBox that
    > currently has the focus as & when some text is being typed in that
    > TextBox.
    >
    > Suppose I type the text "466" (without the quotes) in the TextBox &
    > press the Tab key on the keyboard. Without submitting the Form, I shift
    > the focus back to the TextBox & delete the text i.e. make the TextBox
    > empty. Next when I press the Tab key again, the RequiredFieldValidator
    > promptly displays the error message.
    >
    > Again without submitting the Form, I shift the focus back to the
    > TextBox & press 4 on the keyboard. IE's auto-complete feature
    > drops-down a list which lists 466. If I type "466" (again without the
    > quotes) manually from the keyboard & press the Tab key, the error
    > message, as expected, disappears but instead of manually typing 466, if
    > I populate the TextBox by clicking 466 from the auto-complete drop-down
    > list that IE shows & then press the Tab key, the error message still
    > remains as it is though the TextBox is no longer empty now; it has been
    > populated with 466.
    >
    > Is this some sort of bug in the RequiredFieldValidator control?
    >
    > Thanks,
    >
    > Arpan
    >
     
    Nicole Calinoiu, Jul 28, 2006
    #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. Rob
    Replies:
    4
    Views:
    527
    bruce barker
    Jul 18, 2003
  2. Gaurav
    Replies:
    1
    Views:
    836
    S. Justin Gengo
    Aug 20, 2003
  3. Dave

    RequiredFieldValidator control

    Dave, Oct 11, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    432
  4. Hazz
    Replies:
    5
    Views:
    488
  5. =?Utf-8?B?TWFyaw==?=

    RequiredFieldValidator for 1 control or other

    =?Utf-8?B?TWFyaw==?=, Dec 13, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    374
Loading...

Share This Page