how to change password

Posted by Suneel161 under Regular Expressions on 4/4/2010 | Views : 2442 | Status : [Member] | Replies : 3
hii

i have 2 textboxes(oldpassword,newpassword) and one button(save).when i click savebutton it should be update password.




Responses

Posted by: Vuyiswamb on: 4/4/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
ok the First thing you need to write a function that will check the validity of the old password.

First write a function that will check the old password from the database onblur or when the textbox loses focus, it should check for that old password validity and if its incorrect then make the page.isvalid to false.

If the password is valid then check if the new password is not an empty string and update the Password field based on the username.

if you have code problem say so i will contruct an example, but its good if you try something first and when you fail i will continue.

Thank you for posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Suneel161 on: 4/4/2010 [Member] Starter

Up
0
Down
hii vuyiswamb

how to get username.

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 4/7/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
You want to check the username exist , then onblur write a function that will return an an integer. e.,g

Create proc Check_Username_Existance

@Username varchar(30),
@Results int OUTPUT
as
set @Results = (select count(*) from Myusertable where Username = @Results)


and

in your C# you can write a code to check if the value of is greater than 0 , if there is , then the username exist




Thank you for posting at Dotnetfunda
[Administrator]

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response