AJAX Control Toolkit - PasswordStrength(密码强度指示)

TargetControlID - ID of the TextBox to attach to(要添加扩展的TextBox ID)

DisplayPosition - Positioning of the strength indicator relative to the target control(密码强度提示相对于TextBox的位置,AboveLeft,AboveRight,BelowLeft,BelowRight,LeftSide,LeftRight)

StrengthIndicatorType - Strength indicator type (Text or BarIndicator)/强度只是类型(文本或指示条)

PreferredPasswordLength - Preferred length of the password(密码的首选长度)

PrefixText - Text prefixed to the display text when StrengthIndicatorType=Text(ex: PrefixText="Strength:" )

TextCssClass - CSS class applied to the text display when StrengthIndicatorType=Text

MinimumNumericCharacters - Minimum number of numeric characters

MinimumSymbolCharacters - Minimum number of symbol characters (ex: $ ^ *)

RequiresUpperAndLowerCaseCharacters - Specifies whether mixed case characters are required(密码是否需要包括大小写)

MinimumLowerCaseCharacters - Only in effect if RequiresUpperAndLowerCaseCharacters property is true. Specifies the minimum number of lowercase characters required when requiring mixed case characters as part of your password strength considerations.(至少输入小写字母位数)

MinimumUpperCaseCharacters - Only in effect if RequiresUpperAndLowerCaseCharacters property is true. Specifies the minimum number of uppercase characters required when requiring mixed case characters as part of your password strength considerations(至少输入大写字母位数)

TextStrengthDescriptions - List of semi-colon(分号) separated(分隔) descriptions used when StrengthIndicatorType=Text (Minimum of 2, maximum of 10; order is weakest to strongest)

BarBorderCssClass - CSS class applied to the bar indicator's border when StrengthIndicatorType=BarIndicator

BarIndicatorCssClass - CSS class applied to the bar indicator's inner bar when StrengthIndicatorType=BarIndicator

StrengthStyles - List of semi-colon separated CSS classes that are used depending on the password's strength. This property will override the BarIndicatorCssClass / TextIndicatorCssClass property if present. The BarIndicatorCssClass / TextIndicatorCssClass property differs in that it attributes one CSS style to the BarIndicator or Text Strength indicator (depending on which type is chosen) regardless of password strength. This property will cause the style to change based on the password strength and also to the number of styles specified in this property. For example, if 2 styles are defined like StrengthStyles="style1;style2" then style1 is applied when the password strength is less than 50%, and style2 is applied when password strength is >= 50%. This property can have up to 10 styles.(低版本中不支持次属性)

HelpStatusLabelID - Control ID of the label used to display help text

HelpHandleCssClass - CSS class applied to the help element used to display a dialog box describing the password requirements

HelpHandlePosition - Positioning of the help handle element relative to the target control

 <asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<br />
&nbsp; Text Indicators<br />
&nbsp;
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>&nbsp;<br />
&nbsp;
<asp:Label ID="Label1" runat="server" Width="153px"></asp:Label><br />
<br />
&nbsp; Status Bar Indicators<br />
&nbsp;
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
&nbsp;
<asp:Label ID="Label2" runat="server" Width="154px"></asp:Label><br />
<br />
&nbsp; Help Indicators<br />
&nbsp;
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><br />
&nbsp;
<asp:Label ID="Label3" runat="server" Width="154px"></asp:Label><br />
<br />
<br />
<ajaxToolkit:PasswordStrength ID="PasswordStrength1" runat="server" TargetControlID="TextBox1"
DisplayPosition
="RightSide"
StrengthIndicatorType
="Text"
PreferredPasswordLength
="10"
PrefixText
="Strength:"
TextStrengthDescriptions
="Very Poor;Weak;Average;Strong;Excellent"
MinimumNumericCharacters
="0"
MinimumSymbolCharacters
="0"
HelpStatusLabelID
="Label1"
TextCssClass
="TextIndicator_TextBox1"
RequiresUpperAndLowerCaseCharacters
="false">
</ajaxToolkit:PasswordStrength>
<ajaxToolkit:PasswordStrength ID="PasswordStrength2" runat="server" TargetControlID="TextBox2"
DisplayPosition
="RightSide"
StrengthIndicatorType
="BarIndicator"
BarIndicatorCssClass
="BarIndicator_TextBox2"
BarBorderCssClass
="BarBorder_TextBox2"
PreferredPasswordLength
="10"
PrefixText
="Strength:"
TextStrengthDescriptions
="Very Poor;Weak;Average;Strong;Excellent"
MinimumSymbolCharacters
="1"
HelpStatusLabelID
="Label2"
StrengthStyles
="BarIndicator_TextBox2;BarIndicator_TextBox2a;BarIndicator_TextBox2b"
RequiresUpperAndLowerCaseCharacters
="true">
</ajaxToolkit:PasswordStrength>

<ajaxToolkit:PasswordStrength ID="PasswordStrength3" runat="server" TargetControlID="TextBox3"
TextCssClass
="TextIndicator_TextBox3"
DisplayPosition
="RightSide"
StrengthIndicatorType
="Text"
PreferredPasswordLength
="20"
PrefixText
="Meets Polixy : "
MinimumNumericCharacters
="2"
MinimumSymbolCharacters
="2"
HelpStatusLabelID
="Label3"
HelpHandleCssClass
="TextIndicator_TextBox3_Handle"
HelpHandlePosition
="BelowRight"
TextStrengthDescriptions
="Not at all; Very Low Compliance; Low Compliance; Average Compliance; Good Compliance; High Compliance; Yes"
RequiresUpperAndLowerCaseCharacters
="true" >
</ajaxToolkit:PasswordStrength>

  

 1 .TextIndicator_TextBox1 {
2 background-color: Gray ;
3 height:20px;
4 color:White;
5 font-family:"Comic Sans MS";
6 font-size: large;
7 font-style:italic;
8 padding: 2px 3px 2px 3px;
9 }
10 .BarIndicator_TextBox2
11 {
12 color:red;
13 background-color:red;
14 padding:0;
15 }
16
17 .BarIndicator_TextBox2a
18 {
19 color:Yellow;
20 background-color:Yellow;
21 padding:0;
22 }
23 .BarIndicator_TextBox2b {
24 color:Green;
25 background-color:Green;
26 padding:0;
27 }
28
29 .BarBorder_TextBox2 {
30 border-style:solid;
31 border-width:1px;
32 width:200px;
33 vertical-align:middle;
34 }
35
36 .TextIndicator_TextBox3 {
37 background-color:Blue;
38 color:Yellow;
39 font-size:small;
40 font-variant:small-caps;
41 padding: 2px 3px 2px 3px;
42 }
43
44 .TextIndicator_TextBox3_Handle {
45 width:16px;
46 height:14px;
47 background-image:url(images/Question.png);
48 overflow:hidden;
49 cursor:help;
50 }

>>More Info

你可能感兴趣的:(password)