Ajax controltoolkit Learning Log-passwordstrengthextender (20)

Source: Internet
Author: User
The passwordstrengthextender control is used to prompt and control the password entered in the textbox.

Here is an example:

1) Create an ASP. NET Ajax-enabled web project in vs2005 and name it passwordstrengthextender1.

2) drag and drop a textbox on the page to enter the password and change its textmode to password. Then, drag and drop a label in the row below it to prompt the password status entered in the textbox. Finally, drag and drop a passwordstrengthextender to control the password status and set some attributes.

CodeAs follows: 1 < ASP: Label ID = "Label1" Runat = "Server" Text = "Lower complexity" > </ ASP: Label > < BR />
2 < BR />
3 < ASP: textbox ID = "Textbox1" Runat = "Server" Textmode = "Password" > </ ASP: textbox >
4 & Nbsp;
5 < BR />
6 < ASP: Label ID = "Label2" Runat = "Server" Text = "" > </ ASP: Label > < BR />
7 < PC3: passwordstrength ID = "Passwordstrength1" Targetcontrolid = "Textbox1" Helpstatuslabelid = "Label2" Displayposition = "Rightside" Barbordercssclass = "Barborder_textbox2" Barindicatorcssclass = "Barindicator_textbox2" Textstrengthdescriptions = "Very poor; weak; average; strong; excellent" Preferredpasswordlength = "10" Prefixtext = "Strength :" Minimumnumericcharacters = "2" Minimumsymbolcharacters = "2" Requiresupperandlowercasecharacters = "True" Strengthindicatortype = "Barindicator" Runat = "Server" >
8 </ PC3: passwordstrength >

Attribute description:
Targetcontrolid : The target control associated with the control.
Helpstatuslableid : The label that prompts the password in textbox.
Displayposition : Display position of bar or text specified in strengthindicator. There are rightside, aboveright, aboveleft, leftside, belowright, and belowleft.
Barbodercssclass : When the display mode specified in strengthindicator is barindicator, set the CSS style of the bar border.
Barindicatorcssclass : Set the CSS style of the content in bar.
Textstrengthdescriptions : When the value of strenthindicator is set to text, different prompts are displayed for passwords of different strength.
Preferredpasswordlength : Set the preferred password length in textbox.
Prefixtext : When strengthindicator Specifies text, this prefix is displayed for different prompts.
Minimumnumericcharactors : The number of numbers that must be included in the password entered in textbox.
Minimumsymboliccharactors : The number of tokens that must be included in the password entered in textbox.
Requiresupperandlowercasecharacters : Used to specify whether the password requires a mix of characters.
Strengthindicatortype : Specifies whether the password strength is text or bar.

3) press Ctrl + F5 to view the information in the browser.

As follows:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.