LittlBUGer
Programmer
Hello. I'm using ASP.NET 2.0 and I have a page that does user registration. I've had it all working fine for a while until I noticed a couple things that it wasn't checking. It wasn't checking to see if the email entered was a real email (by format) so I had to use a regularexpression validator to do so, which went fine. The other problem though, is checking the password entered to see if it contains the username entered. Thus, I would NOT want someone to register with the following info:
Username: BobbyJoe
Password: BobbyJoe1 (or bobbyjoe1)
So by going into the CreatingUser event, I think I've successfully been able to check for the username being in the password and I can call the e.Cancel = true part of it to stop the registration process from continuing, but I can't figure out how to throw up an error about this. I've tried using a label or something but nothing seems to work. Has anyone else had any similar issues? Thanks for your help.
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein
Username: BobbyJoe
Password: BobbyJoe1 (or bobbyjoe1)
So by going into the CreatingUser event, I think I've successfully been able to check for the username being in the password and I can call the e.Cancel = true part of it to stop the registration process from continuing, but I can't figure out how to throw up an error about this. I've tried using a label or something but nothing seems to work. Has anyone else had any similar issues? Thanks for your help.
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein