|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
required field validators and not validating until submit button clickedi read this in a book: "...There is also logic in place to avoid enforcing
RequiredFieldValidator controls until the page has been submitted (or has attempted to be submitted) at least once. This allows users to fill in fields in any order without being warned that a field is required..." is this true and if so how does the framework know to do this? i wonder because in our web app, if you say have a value in a textbox with a RFV and then blank it out and tab out, an alert popup shows up (validator is set to dynamic display) so it validates immediately instead of waiting till the submit button runs (which calls Page_ClientValidate) thanks Fields can be filled in in any order, but if you go to a field with an RFV
and then leave it without typing anything, you'll get warned about the validation. This is the normal behavior. On the other hand, you can move around the fields and fill them in as you please without triggering the RFV. The control must receive the focus and then lose it to validate before the page submit will trigger validation. Show quote "TS" <manofsteele1@nospam.nospam> wrote in message news:uohrN4wIIHA.5980@TK2MSFTNGP04.phx.gbl... >i read this in a book: "...There is also logic in place to avoid enforcing >RequiredFieldValidator controls until the page has been submitted (or has >attempted to be submitted) at least once. This allows users to fill in >fields in any order without being warned that a field is required..." > > is this true and if so how does the framework know to do this? > > i wonder because in our web app, if you say have a value in a textbox with > a RFV and then blank it out and tab out, an alert popup shows up > (validator is set to dynamic display) so it validates immediately instead > of waiting till the submit button runs (which calls Page_ClientValidate) > > thanks > > |
|||||||||||||||||||||||