• How to check Password strength using AJAX in ASP.NET

    by  • April 18, 2014 • Microsoft .NET AJAX, Microsoft ASP.NET • 0 Comments

    Password strength indicator shows us that how strong or weak our password is and what we are we missing in our password when we are signing up to a website.These days, almost every site implement password strength indicator in different ways on their registration page. There are lots of solutions available to check the password strength. You can also use third party APIs in your ASP.NET website to check password strength or you can create your own simple password strength indicator using AJAX or jQuery.

    In this article, I will show you that how you can create a simple password strength indicator using AJAX. AJAX control Toolkit has a control with the name of PasswordStrength which helps to create an indicator along with CSS. It has an attribute named StengthIndicatorType that provides you the facility to set the indicator type to Text or BarIndicator. You can also write CSS for different stages of strength and mention these in TextStrengthDescriptionStyles and you can also show different text along with different colors to indicate user.

    Now let’s see how to do all this. I will show you two password indicators with text and bar. You need to download AJAX control toolkit and add into your website.

    Create a website in visual studio and add a webform in C# or VB.NET

    Write click in Toolbox, click Add tab and then select. Click on choose items in the tab and browse for AJAX control toolkit.

    First Write following CSS.


    Add a ScriptManager in your webform


    Now add following code


    You can see, I have added all attributes in the PasswordStrength control  which I have mentioned earlier in the article. Download complete sample code below.

    Download497 downloads

    Best WordPress Themes and Plugins with Great Team and Support!

    Avatar of GetCodeSnippet.com


    GetCodeSnippet.com provides you high quality Microsoft .NET development related articles, tutorials and sample code for ASP.NET, C#, VB.NET, AJAX, WCF, WPF, Web Services, Windows Services, SQL Server and other technologies.

    Leave a Reply