Validators

  • Thread starter Thread starter Bart Schelkens
  • Start date Start date
B

Bart Schelkens

Hi,

I created a login-screen.
I put 2 requiredfieldvalidators (one for the username and one for the
password).
I also put a validationsummary.
Now when I leave username or password blank the error is displayed in the
validationsummary.

What I would like to do now, is when I'm trying to login and I get an error
that the username or the password is not correct, I want to display that
message in the validationsummary as well.

Is this possible? If so, how can I do that ?

Thx.
 
Bart Schelkens said:
Hi,

I created a login-screen.
I put 2 requiredfieldvalidators (one for the username and one for the
password).
I also put a validationsummary.
Now when I leave username or password blank the error is displayed in the
validationsummary.

What I would like to do now, is when I'm trying to login and I get an error
that the username or the password is not correct, I want to display that
message in the validationsummary as well.

Is this possible? If so, how can I do that ?

Thx.

Add a CustomValidator with server-side code that checks the login
(or the result of the "real" login-attempt).
You could even skip the server-side event-handler and set the IsValid
property from within the "login button click handler".

Hans Kesting
 
Back
Top