Validation Controls

  • Thread starter Thread starter Murphy
  • Start date Start date
M

Murphy

I would like to utilise validation controls on a user login page however
there are two scenarios I need to validate and I am unsure if this is
possible or how to implement it.

Firstly, if the user clicks "login" then they must have entered a username
and password in the appropriate boxes alternatively if the user clicks
"Password forgotten" then they must have entered a value in the username box
and the password box is not required in this scenario.

Thanks

Murphy
 
Hi Murphy

"Firstly, if the user clicks "login" then they must have entered a username and password in the appropriate boxes

This can be implemented using the required field validators for both the textboxes (username and password) and set the causes validation for the "login button" to true

"alternatively if the user clicks "Password forgotten" then they must have entered a value in the username box and the password box is not required in this scenario.

for this you need to register a javascript on the page load and associate it with the click of the "forgot password" button which will disable the required field validator for the password

the following code will allow you to disable the validator for the password textbox
ValidatorEnable( document.getElementById(vReqtxtPasswordEntry), false);

HT
Ashish Bhonkiy



----- Murphy wrote: ----

I would like to utilise validation controls on a user login page howeve
there are two scenarios I need to validate and I am unsure if this i
possible or how to implement it

Firstly, if the user clicks "login" then they must have entered a usernam
and password in the appropriate boxes alternatively if the user click
"Password forgotten" then they must have entered a value in the username bo
and the password box is not required in this scenario

Thank

Murph
 
Back
Top