<asp:ChangePassword ID="ChangePassword1" runat="server" Width="100%" OnChangePasswordError="ChangePassword1_ChangePasswordError" OnChangingPassword="ChangePassword1_ChangingPassword" OnChangedPassword="ChangePassword1_ChangedPassword"> <ChangePasswordTemplate> <fieldset> <div class="form-group"> <asp:Label ID="CurrentPasswordLabel" runat="server" AssociatedControlID="CurrentPassword">Password:</asp:Label> <asp:TextBox ID="CurrentPassword" runat="server" TextMode="Password" CssClass="form-control"></asp:TextBox> <asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" ControlToValidate="CurrentPassword" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="ChangePassword1" ForeColor="#A94442">Password is required</asp:RequiredFieldValidator> </div> <div class="form-group"> <asp:Label ID="NewPasswordLabel" runat="server" AssociatedControlID="NewPassword">New Password:</asp:Label> <asp:TextBox ID="NewPassword" runat="server" TextMode="Password" CssClass="form-control"></asp:TextBox> <asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" ControlToValidate="NewPassword" ErrorMessage="New Password is required." ToolTip="New Password is required." ValidationGroup="ChangePassword1" ForeColor="#A94442">New Password is required.</asp:RequiredFieldValidator> </div> <div class="form-group"> <asp:Label ID="ConfirmNewPasswordLabel" runat="server" AssociatedControlID="ConfirmNewPassword">Confirm New Password:</asp:Label> <asp:TextBox ID="ConfirmNewPassword" runat="server" TextMode="Password" CssClass="form-control"></asp:TextBox> <asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" ControlToValidate="ConfirmNewPassword" ErrorMessage="Confirm New Password is required." ToolTip="Confirm New Password is required." ValidationGroup="ChangePassword1" ForeColor="#A94442">Confirm New Password is required.</asp:RequiredFieldValidator> </div> <fieldset style="margin: 10px;"> <asp:CompareValidator ID="NewPasswordCompare" runat="server" ControlToCompare="NewPassword" ControlToValidate="ConfirmNewPassword" Display="Dynamic" ErrorMessage="The Confirm New Password must match the New Password entry." ValidationGroup="ChangePassword1" CssClass="alert alert-danger"></asp:CompareValidator> </fieldset> <!-- Change this to a button or input when using this as a form --> <fieldset> <asp:Button ID="ChangePasswordPushButton" runat="server" CommandName="ChangePassword" Text="Change Password" ValidationGroup="ChangePassword1" CssClass="btn btn-lg btn-success " OnClientClick="return BtnClick();" /> <asp:Button ID="CancelPushButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" CssClass="btn btn-lg btn-danger " OnClick="CancelPushButton_Click" /> </fieldset> <fieldset style="margin-removed 5px; color: red;"> <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal> </fieldset> </ChangePasswordTemplate> </asp:ChangePassword>
<pre lang="HTML"> <membership defaultProvider="DefaultMembershipProvider"> <providers> <add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /> </providers> </membership>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)