How to use ChangePassword control in asp.net

ChangePassword Web Server Control
ChangePassword is an ASP.NET web server control. ChangePassword control enables website users to change the passwords they use to log in to the website.

ChangePassword server control uses the membership provider defined by the MembershipProvider property to change the password stored in the membership provider data store. ChangePassword control uses the default membership provider if a membership provider does not assign by web developers.

We can configure ChangePassword control to use email services to send the new password to the user. To send users a new password to their email address, we must configure an email server in the Web.config file for an ASP.NET application.

ChangePassword control has two states or views, the change password view and the success view. The change password view requests the current password and requires inputting the new password twice. The success views display confirmation that the password has been changed.

The following ASP.NET C# example code demonstrates to us how can we use ChangePassword web server control in an ASP.NET application.
ChangePasswordExample.aspx

<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>ChangePassword control example: how to change password in asp.net</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:LoginStatus ID="LoginStatus1"  runat="server"/>
        <br />
        <asp:LoginName ID="LoginName1" runat="server" FormatString="Hi {0}!" Font-Size="XX-Large" ForeColor="BurlyWood" />
        <br /><br />
        <asp:ChangePassword ID="ChangePassword1" runat="server" ></asp:ChangePassword>
    </div>
    </form>
</body>
</html>