Link to home
Start Free TrialLog in
Avatar of jazzIIIlove
jazzIIIloveFlag for Sweden

asked on

In ASP.NET, need to have check and set password for a user having an id in MSSQL database. Example code?

Hi there;


In ASP.NET, I need to check and set password for a user having an id in MSSQL database. Could you provide me an example code (checking whether the user is in database, if so, checking for the password)?

void SetPassword(int No, string oldPassword, string newPassword) is the function definition.

Kind regards.
ASKER CERTIFIED SOLUTION
Avatar of Anil Golamari
Anil Golamari
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jazzIIIlove

ASKER

ok but what is the point of passing old password?

Can you give me a scenario?

Regards.
You mentioned that you need to check the UserID and then if UserID is available then to check the password. So here the scenario is like logging into a site. First you enter your username and pwd. Then you make a call to DB to check the UserName If username is there in DB then check with the corresponding Pwd, if not redirect the user to create a UserID and pwd page.