IntroductionIn this post, I explain how to check password strength (policy) in the registration form in an ASP.Net Application.
PrerequisiteI used followings:
- .Net framework 4.0
Steps :Just follow the steps and get result easily.
Step - 1 : Create New ProjectGo to File > New > Project > Select asp.net web forms application > Entry Application Name > Click OK.
Step-2: Add a Web Form (page).Go to Solution Explorer > Right Click on Project under solution explorer > Add > New item > Select Web Form Using master page> Enter Name > Add.
Step-3: Design your Registration formplace this Html Code inside a form tag
Step-4: Write Server side code for check password strength.Here is the complete code :
Inside submit Button Event
Here run the application and Check result.
Here I have checked using server side code. It will much more useful if we check password strength from client side also. just follow the steps:-
Step-5: Add Client side code to check password strength.Here we need to add the jquery library.
for this add this function to head section.
Step-6: Run Application.Now type your password in the password field and get the result.
Download Source Code