What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 50584 |  Welcome, Guest!   Register  Login
 Home > Forums > ASP.NET 4.0 > how to change password ...
Suneel161

how to change password

Replies: 3 | Posted by: Suneel161 on 4/4/2010 | Category: ASP.NET 4.0 Forums | Views: 1685 | Status: [Member]  


hii

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


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Vuyiswamb
Vuyiswamb  
Posted on: 4/4/2010 3:26:13 AM
Level: NotApplicable | Status: [Member] [MVP] [Administrator]

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. | Reply | Alert Moderator 

Suneel161
Suneel161  
Posted on: 4/4/2010 5:03:51 AM
Level: Starter | Status: [Member]

hii vuyiswamb

how to get username.

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

Vuyiswamb
Vuyiswamb  
Posted on: 4/7/2010 2:17:12 AM
Level: NotApplicable | Status: [Member] [MVP] [Administrator]

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. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/22/2013 7:19:45 AM