468,457 Members | 1,756 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,457 developers. It's quick & easy.

RequiredFieldValidator Control Bug?

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

Jul 28 '06 #1
1 2369
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" <ar******@hotmail.comwrote in message
news:11*********************@75g2000cwc.googlegrou ps.com...
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
Jul 28 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by James | last post: by
2 posts views Thread by Hongbo | last post: by
1 post views Thread by Giovanni | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.