We help IT Professionals succeed at work.

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

jazzIIIlove
jazzIIIlove asked
on
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.
Comment
Watch Question

CERTIFIED EXPERT

Author

Commented:
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.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.