How to use ChangePassword control in

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

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 assigned by web developers.

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

ChangePassword control has two states or views, change password view and success view. the change password view request the current password and require to input new password twice. success view display confirmation that the password has been changed.

the following c# example code demonstrate us how can we use ChangePassword web server control in an application.

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

<!DOCTYPE html>

<script runat="server">


<html xmlns="">
<head runat="server">
    <title>ChangePassword control example: how to change password in</title>
    <form id="form1" runat="server">
        <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>
More examples