Decrease Font Size
Increase Font Size
   BLOG

ASP.NET - Password Strength Indicator using jQuery and XML – Update 3

ASP.NET - Password Strength Indicator using jQuery and XML – Update 3 (v01.03.00)

Recently a user reported to me the issue with the Password Strength Indicator using jQuery and XML plug-in. The problem will occur (Figure 1) if the Label control ID contains the ID of the Textbox control (Listing 1). 

Listing 1

<asp:label runat="server" id="lblPassword" AssociatedControlId="Password">Enter Password:</asp:label>
<asp:TextBox ID="Password" runat="server"></asp:TextBox>

Figure 1

double bars

Solution:
This issue is very rare but they are several solution we can apply to suppress it.

  1. Exclude the id attribute from the Label control
  2. Make sure that the Label control ID does not contain the ID of the Textbox/input control
  3. Modify this line
    var myPlugin = $("[id$='txtPassword']").password_strength();
    TO
    var myPlugin = $("input[id$='txtPassword']").password_strength();

 

Comments are closed