Click here to Skip to main content
16,018,818 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
i want to change password from database where i have three text box, one old password ,new password and confirm password in c#
Posted
Comments
#realJSOP 27-Jun-11 12:24pm    
So what have you tried?

See here for the syntax of the T-SQL update statement[^]. Since you've not tagged your question properly I'll just assume you're using some sort of MS SQL Server.

Cheers!

--MRB
 
Share this answer
 
Some points to consider:

1) If you're hashing the password, you'll want to first check to see if the existing one matches. You can likely use an existing stored proc to emulate a log-on and verify the old password.

2) You can verify the new password on the client side before sending it to the server. If you're on ASP.NET there are a number of techniques for this (the AJAX library includes the RegEx controls to do this, or you can easily use jQuery to check for validity).

3) Use the other recommended source for pushing the new value into the table. Remember that if your authentication system is hashing/encrypting your passwords you may need to do this first (or call the appropriate SP rather than using an update statement you write on your own).

Hope this helps!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900