Change the password for the current user : ChangePassword « Login Security « ASP.Net






Change the password for the current user


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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>I want my password changed</title>
</head>
<body>
    <div id="pageContent">
        <form id="form1" runat="server">
            <asp:ChangePassword ID="ChangePassword1" 
                                runat="server" 
                                BackColor="#F7F6F3"
                                BorderColor="#E6E2D8" 
                                BorderPadding="4" 
                                BorderStyle="Solid" 
                                BorderWidth="1px"
                                DisplayUserName="True" 
                                Font-Names="Verdana">
                <CancelButtonStyle BackColor="#FFFBFF" 
                                   BorderColor="#CCCCCC" 
                                   BorderStyle="Solid"
                                   BorderWidth="1px" 
                                   Font-Names="Verdana" 
                                   Font-Size="0.8em" 
                                   ForeColor="#284775" />
                <ChangePasswordButtonStyle BackColor="#FFFBFF" 
                                           BorderColor="#CCCCCC" 
                                           BorderStyle="Solid"
                                           BorderWidth="1px" 
                                           Font-Names="Verdana" 
                                           Font-Size="0.8em" 
                                           ForeColor="#284775" />
                <ContinueButtonStyle BackColor="#FFFBFF" 
                                     BorderColor="#CCCCCC" 
                                     BorderStyle="Solid"
                                     BorderWidth="1px" 
                                     Font-Names="Verdana" 
                                     Font-Size="0.8em" 
                                     ForeColor="#284775" />
                <TextBoxStyle Font-Size="0.8em" />
                <TitleTextStyle BackColor="#5D7B9D" 
                                Font-Bold="True" 
                                Font-Size="0.9em" 
                                ForeColor="White" />
                <PasswordHintStyle Font-Italic="True" ForeColor="#888888" />
                <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
                <MailDefinition From="firstName@yourServer.com" Subject="Password Change">
                </MailDefinition>
            </asp:ChangePassword>
        </form>
    </div>
</body>
</html>

 








Related examples in the same category

1.ChangePassword control enables end users to change their passwords directly in the browser
2.Set CancelButtonStyle, ChangePasswordButtonStyle, ContinueButtonStyle, PasswordHintStyle, InstructionTextStyle
3.Password must be 8 characters long and includes two numbers and two special character
4.ChangePassword style
5.ChangePassword Template