---
title: "Ajax Toolkit PasswordStrength Control in ASP.Net"  
description: "The PasswordStrength Extender shows the strength of the password in the TextBox and updates itself as the user types the password. The indicator can d"  
author: "Pushpendra Singh"  
published: 2010-12-01  
updated: 2019-12-15  
canonical: https://www.mindstick.com/articles/276/ajax-toolkit-passwordstrength-control-in-asp-dot-net  
category: "ajax"  
tags: ["ajax"]  
reading_time: 2 minutes  

---

# Ajax Toolkit PasswordStrength Control in ASP.Net

The **PasswordStrength Extender** shows the [strength](https://yourviews.mindstick.com/view/86801/unveiling-the-unexplored-strength-mild-steel-squares-a-game-changer-in-the-construction-industry) of the [password](https://www.mindstick.com/blog/118/retriving-user-password-by-using-stored-procedure-in-asp-dot-net) 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](https://answers.mindstick.com/qa/50389/what-to-do-when-your-iphone-6s-keeps-saying-that-your-sim-sent-a-text-message).\

**PasswordStrength [Properties](https://yourviews.mindstick.com/view/81845/now-it-s-possible-to-predict-properties-of-any-molecule):**

· **TargetControlID** - ID of the TextBox to attach to

· **DisplayPosition** - Positioning of the strength indicator relative to the target control

· **StrengthIndicatorType** - Strength indicator type (Text or BarIndicator)

· **PreferredPasswordLength** - Preferred length of the password

· **PrefixText** - Text prefixed to the [display text](https://www.mindstick.com/forum/12715/how-to-display-text-in-an-mvc-view-with-htmlattrbutes) when StrengthIndicatorType=Text

· **MinimumNumericCharacters** - Minimum number of numeric [characters](https://answers.mindstick.com/qa/42112/who-is-the-originator-of-avengers-characters)

· **MinimumSymbolCharacters** - Minimum number of symbol characters (ex: $ ^ *)

· **RequiresUpperAndLowerCaseCharacters** - Specifies whether mixed case characters are [required](https://yourviews.mindstick.com/view/81031/vigilence-required-during-corona-pandemic)

· **MinimumLowerCaseCharacters** - Only in effect if RequiresUpperAndLowerCaseCharacters [property](https://www.mindstick.com/articles/198559/an-ownership-of-property-in-hua-hin) is true.

· **MinimumUpperCaseCharacters** - Only in effect if RequiresUpperAndLowerCaseCharacters property is true.

· **TextStrengthDescriptions** - List of semi-colon separated descriptions used when **StrengthIndicatorType**=Text (Minimum of 2, maximum of 10; order is weakest to strongest)

· **HelpStatusLabelID** - Control ID of the label used to display help text

· **HelpHandlePosition** - Positioning of the help handle [element relative](https://www.mindstick.com/forum/158662/what-is-the-css-property-used-to-control-the-position-of-an-element-relative-to-its-normal-position) to the target control

## Code:

```
 <%-- Add the ScriptManager Control and passwordStrength control--%><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>  <cc1:PasswordStrength ID="PasswordStrength1" runat="server" TargetControlID="TextBox2"></cc1:PasswordStrength>  <asp:Label ID="Label2" runat="server" Text="User Registration" BackColor="AliceBlue" Font-Bold="true"></asp:Label><br /><br /><asp:Label ID="Label1" runat="server" Text="User Name"></asp:Label>&nbsp<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br /><asp:Label ID="Label3" runat="server" Text="Password"></asp:Label>&nbsp&nbsp&nbsp<asp:TextBox ID="TextBox2" runat="server" TextMode="Password"></asp:TextBox></div><p>&nbsp;</p><asp:Button ID="Button1" runat="server" Text="Submit" />
```

\

Here TargetControlID is "TextBox2" in which PasswordStrength will indicated

**Run the project**

![AjaxControl Toolkit PasswordStrength Control in ASP.Net](https://www.mindstick.com/mindstickarticle/dfbd94aa-5a66-4340-bdf3-9ea6aa8a3a9f/images/f35238fb-2ace-494c-8fd1-a44fed87ee36.png)

When you enter the password in Textbox2 then password strength will show. When you enter less password character then it will show strength poor.

![AjaxControl Toolkit PasswordStrength Control in ASP.Net](https://www.mindstick.com/mindstickarticle/dfbd94aa-5a66-4340-bdf3-9ea6aa8a3a9f/images/6ef1bf24-ecdd-4f09-9a27-3d37bca52dae.png)

![AjaxControl Toolkit PasswordStrength Control in ASP.Net](https://www.mindstick.com/mindstickarticle/dfbd94aa-5a66-4340-bdf3-9ea6aa8a3a9f/images/55207427-8289-4fd6-ab17-1b861f8e2b2f.png)

When you enter more password character than previous then it will show strength good

![AjaxControl Toolkit PasswordStrength Control in ASP.Net](https://www.mindstick.com/mindstickarticle/dfbd94aa-5a66-4340-bdf3-9ea6aa8a3a9f/images/f987c0f3-8866-43f2-8d94-12ed6b5628b0.png)

---

Original Source: https://www.mindstick.com/articles/276/ajax-toolkit-passwordstrength-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
