PasswordStrength Example using Ajax In Asp.Net.
In this example i'm explaining how to use PasswordStrength Control of AjaxControlToolkit for asp.net 3.5.
For this Add latest version of AjaxControlToolkit.dll in BIN folder of application and place one textbox and passwordstrength control on the aspx page.
Add below mentioned CSS style in stylesheet.css for strength bar to show up.
Build and run the application.
In this example i'm explaining how to use PasswordStrength Control of AjaxControlToolkit for asp.net 3.5.
For this Add latest version of AjaxControlToolkit.dll in BIN folder of application and place one textbox and passwordstrength control on the aspx page.
Add below mentioned CSS style in stylesheet.css for strength bar to show up.
CSS StyleSheet
.BarIndicatorweak { color:Red; background-color:Red; } .BarIndicatoraverage { color:Blue; background-color:Blue; } .BarIndicatorgood { color:Green; background-color:Green; } .BarBorder { border-style:solid; border-width:1px; padding:2px 2px 2px 2px; width:200px; vertical-align:middle; }Now configure the passwordstrength control as shown below.
<form id="form1" runat="server"> <div> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <asp:TextBox ID="TextBox1" runat="server" TextMode="Password"> </asp:TextBox> <br /> <asp:PasswordStrength ID="PasswordStrength1" runat="server" TargetControlID="TextBox1" RequiresUpperAndLowerCaseCharacters="true" MinimumNumericCharacters="1" MinimumSymbolCharacters="1" MinimumUpperCaseCharacters="1" PreferredPasswordLength="8" DisplayPosition="RightSide" StrengthIndicatorType="Text"> </asp:PasswordStrength> <br /> <br /> <asp:TextBox ID="TextBox2" runat="server" TextMode="Password"> </asp:TextBox> <asp:PasswordStrength ID="PasswordStrength2" runat="server" TargetControlID="TextBox2" RequiresUpperAndLowerCaseCharacters="true" MinimumNumericCharacters="1" MinimumSymbolCharacters="1" MinimumUpperCaseCharacters="1" PreferredPasswordLength="8" DisplayPosition="RightSide" StrengthIndicatorType="BarIndicator" BarBorderCssClass="BarBorder" StrengthStyles="BarIndicatorweak;BarIndicatoraverage;BarIndicatorgood;"> </asp:PasswordStrength> </div> </form>
Build and run the application.