By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,092 Members | 1,546 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,092 IT Pros & Developers. It's quick & easy.

RequiredFieldValidator's Display="Dynamic" acts different when selecting from previously used entries

P: n/a
When testing a form of mine which uses RequiredFieldValidators that have the
Display property set to "Dynamic" the ErrorMessage property is automatically
removed when an entry is completely typed and the user leaves the textbox.
However, if the entry is selected from the list of previously typed entries,
the error does not disappear until the page is validated using the
Page.Validate() method. I find this very weird (not to mention it may be
confusing to visitors who use the form), since selecting from the list of
previously typed entries is supposed to be the same as typing something in.
Has anyone else noticed this? Is it simply a bug that will hopefully be
fixed in a future version of the .NET Framework? Is it only a problem with
IE (I am using IE 6.0 for my testing)? I would like to avoid this problem to
prevent confusion as to what is a valid entry, but I don't want to have to
postback to the server for every field in the form. Am I missing something?
Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
The autocomplete feature - the list of suggestions - does not fire the
onchange event on IE. This is an unfortunate feature of IE. The onchange
event is what the validators use to fire them when a field changes.

As the author of a replacement to the Microsoft validators, I have addressed
this by creating an improved TextBox control that has some extra javascript
to detect this case and fire my validators. ("Professional Validation And
More" at http://www.peterblum.com/vam/home.aspx)

Regardless of this limitation, you should have your server side code always
validate. Its simple. Just test Page.IsValid is true in the Click post back
event method. The reason to do it on the server side: client-side validation
is only designed around DHTML browsers (IE and IE/Mac) - my Professional
Validation And More supports many more - and javascript may be disabled on
the browser.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:eH**************@tk2msftngp13.phx.gbl...
When testing a form of mine which uses RequiredFieldValidators that have
the Display property set to "Dynamic" the ErrorMessage property is
automatically removed when an entry is completely typed and the user
leaves the textbox. However, if the entry is selected from the list of
previously typed entries, the error does not disappear until the page is
validated using the Page.Validate() method. I find this very weird (not to
mention it may be confusing to visitors who use the form), since selecting
from the list of previously typed entries is supposed to be the same as
typing something in. Has anyone else noticed this? Is it simply a bug that
will hopefully be fixed in a future version of the .NET Framework? Is it
only a problem with IE (I am using IE 6.0 for my testing)? I would like to
avoid this problem to prevent confusion as to what is a valid entry, but I
don't want to have to postback to the server for every field in the form.
Am I missing something? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.