hi to all,
i use asp membership,
now i want create a page for user for change password,but
i don't want to use <asp:ChangePassword>
i want create this custom,
my problem is: i want check user oldpassword from oldpassword textbox ,if currect, password change, and display "success" message, or wrong, display "oldpassword wrong" message.
my html code is:
my problem is: i want check user oldpassword from oldpassword textbox ,if currect, password change, and display "success" message, or wrong, display "oldpassword wrong" message.
and my c# code is:
protected void submitchangepassword_Click(object sender, EventArgs e)
{
try
{
System.Web.Security.MembershipUser usr = System.Web.Security.Membership.GetUser();
usr.ChangePassword(oldpassword.Text, newpassword.Text);
errorlabel.Text = "Success";
}
catch (Exception ex) { errorlabel.Text = ex.ToString(); }
}
thank's for you'r help