Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > RequiredFieldValidator Control Bug?

Reply
Thread Tools

RequiredFieldValidator Control Bug?

 
 
Arpan
Guest
Posts: n/a
 
      07-28-2006
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

 
Reply With Quote
 
 
 
 
Nicole Calinoiu
Guest
Posts: n/a
 
      07-28-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RequiredFieldValidator for 1 control or other =?Utf-8?B?TWFyaw==?= ASP .Net 1 12-13-2005 10:22 AM
Is the RequiredFieldValidator a reliable control if supported with sensible form level coding? Hazz ASP .Net 5 04-04-2005 03:16 AM
RequiredFieldValidator control Dave ASP .Net 2 10-11-2004 12:34 PM
RequiredFieldValidator control giving problems. Please help. Gaurav ASP .Net 1 08-20-2003 02:26 PM
ASP:RequiredFieldValidator control is not working on Netscape 7. Rob ASP .Net 4 07-18-2003 05:34 PM



Advertisments