A
Arpan
I have a Web Form in my ASPX page which makes use of Web controls & incorporates validation controls. This is the code snippet that does the needful:
<form runat=server>
NAME:<asp:TextBox id="txtName" runat=server/>
<asp:RequiredFieldValidator ControlToValidate="txtName" ErrorMessage="Enter your name!" Display="Dynamic" runat=server/>
<%-- some other server controls here --%>
<asp:Button id="but1" Text="SUBMIT" OnClick="show" runat=server/>
</form>
Now IE 6.0 has the AutoComplete feature (i.e. if the letter "a" - without the quotes - is typed in a textbox, a list showing previous entries beginning with "a" comes up so that the user can select directly from that list without having to type the entire word again.
Next what I do is submit the Form leaving the textbox empty. As expected, the appropriate error message gets displayed & the Form doesn't get submitted. Now if I type something in the textbox & then make the textbox lose focus (maybe by going to the next control), the error message that was displayed earlier when the Submit button was clicked without any data,as expected, vanishes but if the data is entered in the textbox, not by typing, but by selecting one of the options shown in the AutoComplete list, then the error message doesn't disappear when the textbox loses focus; the error message remains as it is although the textbox is not empty!
Why this discrepancy? How do I get rid of such a behaviour?
Thanks,
Arpan
<form runat=server>
NAME:<asp:TextBox id="txtName" runat=server/>
<asp:RequiredFieldValidator ControlToValidate="txtName" ErrorMessage="Enter your name!" Display="Dynamic" runat=server/>
<%-- some other server controls here --%>
<asp:Button id="but1" Text="SUBMIT" OnClick="show" runat=server/>
</form>
Now IE 6.0 has the AutoComplete feature (i.e. if the letter "a" - without the quotes - is typed in a textbox, a list showing previous entries beginning with "a" comes up so that the user can select directly from that list without having to type the entire word again.
Next what I do is submit the Form leaving the textbox empty. As expected, the appropriate error message gets displayed & the Form doesn't get submitted. Now if I type something in the textbox & then make the textbox lose focus (maybe by going to the next control), the error message that was displayed earlier when the Submit button was clicked without any data,as expected, vanishes but if the data is entered in the textbox, not by typing, but by selecting one of the options shown in the AutoComplete list, then the error message doesn't disappear when the textbox loses focus; the error message remains as it is although the textbox is not empty!
Why this discrepancy? How do I get rid of such a behaviour?
Thanks,
Arpan