-->

Thursday, August 13, 2015

Ajax Password Strength and password indicator example in asp.net

Ajax Password Strength and password indicator example in asp.net

Introduction

In this article i will learn about password strength control of ajax. Example of password indicator of ajax in asp.net. This example cover all such things which is related to password strength.

Description

i already explained about Always visible control example in ajax. Example of calendar extender using ajax. Example of Numeric UpDown Extender example using ajax. Example of Resizable control in asp.net. Slider Extender example in AJAX.


Source code :

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style>
        .very{
background-color:gray;
color:white;
        }
.weak{
    background-color:Red;
color:white;

}
.average{
    background-color:blue;
color:white;
}
.good{
    background-color:orange;
    color:green;
}
.excellent
{
    background-color:green;
    color:black;
}
        .barline
        {
            border-style:solid;
            border-width:2px;
            width:190px;
            padding:2px;

        }
  </style>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <div>
        Password:
        <asp:TextBox TextMode="Password" ID="TextBox1" runat="server" Height="23px" Width="227px"></asp:TextBox>
&nbsp;</div>
        <p>
            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
            <cc1:PasswordStrength PreferredPasswordLength="8" TargetControlID="TextBox1" ID="pwdstrength" runat="server" StrengthIndicatorType="Text" HelpStatusLabelID="Label1" MinimumNumericCharacters="1" MinimumSymbolCharacters="1" TextStrengthDescriptions="very;weak;average;good;excellent" />
        </p>
        <p>
            &nbsp;</p>
        <p>
            PassWord Indicator :
        <asp:TextBox TextMode="Password" ID="TextBox2" runat="server" Height="23px" Width="227px"></asp:TextBox>
            <cc1:PasswordStrength TextStrengthDescriptionStyles="very;weak;average;good;excellent" BarBorderCssClass="barline" PreferredPasswordLength="8" TargetControlID="TextBox2" ID="TextBox2_PasswordStrength" runat="server" StrengthIndicatorType="BarIndicator" HelpStatusLabelID="Label2" MinimumNumericCharacters="1" MinimumSymbolCharacters="1" TextStrengthDescriptions="very;weak;average;good;excellent" />
       
        </p>
        <p>
            <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
        </p>
       
    </form>
</body>
</html>
In this example TextStrengthDescriptionStyles cover all css classes which is covered in the example. StrengthIndicatorType define the appearance of the validator.

Code generate the following outout

Ajax Password Strength and password indicator example in asp.net



Read other related articles

Also read other articles

© Copyright 2013 Computer Programming | All Right Reserved