473,326 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 2566
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: BK | last post by:
I'm having a really strange problem with and HtmlSelect server control (listbox) and a RequiredFieldValidator that I am trying to use to make sure that someone has items in the listbox. The way...
3
by: Navin | last post by:
Hello friends... On a single asp.net web page i have a single server-side form that contains a couple of user-controls. Each user control has its own functionality and contains server-side textbox...
1
by: peshrad | last post by:
Hi ! I'm using Visual Studio .NET to program a Web application coding in C#. In my form I use an HtmlSelect control that calls a JavaScript function when the selected item changes. This...
7
by: Ed West | last post by:
Hello, I have a simple form with some input boxes. After validation if one fails, then I would like to at the top of the page say something like "The following fields in red are required" and...
4
by: James | last post by:
Hello, I have a RequiredFieldValidator for several textbox controls on a form. Here's an example with the RequiredFieldValidator. EnableClientScript, Enabled, and Visible are set to true for...
2
by: Hongbo | last post by:
Hi, I have a Asp.Net written in C#. It serve as information input form. The form encounters sort of random problem with the email field and state field. I have validator attached with these 2...
1
by: Giovanni | last post by:
Dear Friends, I need your help. I am trying to dynamically create a RequiredFieldValidator in the ItemCreated event of a DataList but cannot get it to work. The errors seem to revolve around...
2
by: Christina | last post by:
Hello !! I am creating a dynamic textbox and want to validate it using the requiredfieldvalidator. These are the steps which I tried: ==================================================== 1)...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.