show-notice
hide-notice

Thursday, 4 July 2013

How to use PasswordStrength in asp.net ajax




Introduction: 

PasswordStrength is an ASP.NET AJAX extender that can be attached to an ASP.NET TextBox control used for the entry of passwords. The PasswordStrength extender shows the strength of the password in the TextBox and updates itself as the user types the password. The indicator can display the strength of the password as a text message or with a progress bar indicator.

Description:

The styling and position of both types of indicators is configurable. The required strength of the password is also configurable, allowing the page author to tailor the password strength requirements to their needs. 

     The text messages that describe the current strength of the password can also be configured and their default values have localization support built-in. The second and third extenders' strings are being pulled from Toolkit resources files. We do not have strings for all languages currently so they may show non-localized values for some languages. A help indicator can be used to provide explicit instructions about what changes are required to achieve a strong password. The indicator is displayed when the user begins typing into the TextBox and is hidden from view once the TextBox loses focus.






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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server"> 
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Ajax PasswordStrength - How to use PasswordStrength in asp.net ajax</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color: DarkSeaGreen; font-style: italic;">
            Ajax Control Toolkit Example: Using PasswordStrength</h2>
        <hr width="550" align="left" color="DarkSeaGreen" />
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <cc1:PasswordStrength ID="PasswordStrength1" runat="server" TargetControlID="TextBox1">
        </cc1:PasswordStrength>
        <br />
        <br />
        <asp:Label ID="Label1" runat="server" ForeColor="OrangeRed" Font-Bold="true" Text="Input your password"> 
        </asp:Label>
        <asp:TextBox ID="TextBox1" runat="server"> 
        </asp:TextBox>
    </div>
    </form>
</body>
</html>








SHARE THIS POST   

0 comments :

Post a Comment

Design by Gohilinfotech | www.gohilinfotech.blogspot.com