- I think you will be prompted about the strength of your password when you enter your password in some forums or when a website needs to change your password. The Ajax control also has something to implement this function, namely passwordstrength.
- Let's look at the example first.
On the surface, this is a lable and a common Textbox, prompting you to enter the password.
At the time of input, a prompt message is displayed on the right. Is a lable. The maximum number and characters that can be entered. The following yellow is the default, indicating the password strength. Strong, medium, and poor. Can be customized.
- In this example, two labels are used. One is used to display the prompt information, and the other is the tag. Needless to say, textbox is set to password.
- Attribute description:
Displayposition: the position of the prompt
Helpstatuslabelid: displays the remaining information controls.
Minimumnumericcharacters: Minimum number of characters. In this example, "3"
Prefixtext: The displayed prompt text "password strength"
Targetcontrolid: the "textbox" under control"
Textstrengthdescriptions: Custom intensity description "strong; moderate; poor"
< Div >
< ASP: scriptmanager ID = "SM" Runat = "Server" >
</ ASP: scriptmanager >
< ASP: updatepanel ID = "Updatepanel1" Runat = "Server" >
< Contenttemplate >
< Ajax: passwordstrength ID = "Ps" Runat = "Server" Displayposition = "Belowleft" Helpstatuslabelid = "Label2"
Minimumnumericcharacters = "3" Prefixtext = "Password strength :" Targetcontrolid = "Textbox" Textstrengthdescriptions = "Strong; moderate; poor" >
</ Ajax: passwordstrength >
< ASP: Label ID = "Label" Runat = "Server" Text = "Password" > </ ASP: Label >
< ASP: textbox ID = "Textbox" Runat = "Server" Autocompletetype = "Disabled" Textmode = "Password" > </ ASP: textbox >
< ASP: Label ID = "Label2" Runat = "Server" Text = "Label" > </ ASP: Label >
</ Contenttemplate >
</ ASP: updatepanel >
</ Div >