PasswordStrength控件在哪儿?我用的是vs2010,谢谢了
2个回答
展开全部
属性
描述
TargetControlID
要检测密码的TextBox控件ID
DisplayPosition
提示的信息的位置,如:
DisplayPosition="RightSide|LeftSide|BelowLeft"
StrengthIndicatorType
强度信息提示方式,有文本和进度条
StrengthIndicatorType="Text|BarIndicator"
PreferredPasswordLength
密码的长度
PrefixText
用文本方式时开头的文字
PrefixText="Strength:"
TextCssClass
用文本方时文字的CSS样式
MinimumNumericCharacters
密码中最少要包含的数字数量
MinimumSymbolCharacters
密码中最好要包含的符号数量(*,#)
RequiresUpperAndLowerCaseCharacters
是否需要区分大小写
TextStrengthDescriptions
文本方式时的文字提示信息
TextStrengthDescriptions="Very Poor;Weak;Average;Strong;Excellent"
BarIndicatorCssClass
进度条的CSS样式
BarBorderCssClass
进度条边框的CSS样式
HelpStatusLabelID
帮助提示信息的Lable控件ID
代码实例:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>PasswordStrength 控件</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<br />
Text Indicators<br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <br />
<asp:Label ID="Label1" runat="server" Width="153px"></asp:Label><br />
<br />
Status Bar Indicators<br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
<asp:Label ID="Label2" runat="server" Width="154px"></asp:Label><br />
<br />
Help Indicators<br />
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><br />
<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"
MinimumNumericCharacters="1"
MinimumSymbolCharacters="1"
HelpStatusLabelID="Label2"
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>
</div>
</form>
</body>
</html>
描述
TargetControlID
要检测密码的TextBox控件ID
DisplayPosition
提示的信息的位置,如:
DisplayPosition="RightSide|LeftSide|BelowLeft"
StrengthIndicatorType
强度信息提示方式,有文本和进度条
StrengthIndicatorType="Text|BarIndicator"
PreferredPasswordLength
密码的长度
PrefixText
用文本方式时开头的文字
PrefixText="Strength:"
TextCssClass
用文本方时文字的CSS样式
MinimumNumericCharacters
密码中最少要包含的数字数量
MinimumSymbolCharacters
密码中最好要包含的符号数量(*,#)
RequiresUpperAndLowerCaseCharacters
是否需要区分大小写
TextStrengthDescriptions
文本方式时的文字提示信息
TextStrengthDescriptions="Very Poor;Weak;Average;Strong;Excellent"
BarIndicatorCssClass
进度条的CSS样式
BarBorderCssClass
进度条边框的CSS样式
HelpStatusLabelID
帮助提示信息的Lable控件ID
代码实例:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>PasswordStrength 控件</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<br />
Text Indicators<br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <br />
<asp:Label ID="Label1" runat="server" Width="153px"></asp:Label><br />
<br />
Status Bar Indicators<br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
<asp:Label ID="Label2" runat="server" Width="154px"></asp:Label><br />
<br />
Help Indicators<br />
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><br />
<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"
MinimumNumericCharacters="1"
MinimumSymbolCharacters="1"
HelpStatusLabelID="Label2"
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>
</div>
</form>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询