0

我正在尝试在我的网络应用程序中实现密码强度功能。但是,没有出现文字说明,只出现“xx 字符”。我的代码有什么问题?

<tr>
    <td>
        <asp:Label ID="Label6" runat="server" Text="Password"></asp:Label>
    </td>
    <td>
        <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" />
    </td>
</tr>

<asp:PasswordStrength ID="txtPassword_PasswordStrength" runat="server" 
Enabled="True" TargetControlID="txtPassword" PreferredPasswordLength="10" 
TextCssClass="TextIndicator_TextBox1" 
RequiresUpperAndLowerCaseCharacters="True"  
HelpStatusLabelID="Label10" 
TextStrengthDescriptions="Poor;Weak;Average;Strong;Excellent" 
StrengthIndicatorType="Text" PrefixText="Strength:" 
MinimumLowerCaseCharacters="0" 
MinimumNumericCharacters="0" MinimumSymbolCharacters="0" 
MinimumUpperCaseCharacters="0" DisplayPosition="RightSide" />
4

2 回答 2

0

尝试这个..

<asp:PasswordStrength ID="txtPassword_PasswordStrength" runat="server" 
Enabled="True" TargetControlID="txtPassword" PreferredPasswordLength="10" 
TextCssClass="TextIndicator_TextBox1" 
RequiresUpperAndLowerCaseCharacters="True"  
HelpStatusLabelID="Label10" 
TextStrengthDescriptions="Poor;Weak;Average;Strong;Excellent" 
StrengthIndicatorType="Text" PrefixText="Strength:" 
MinimumLowerCaseCharacters="1" 
MinimumNumericCharacters="1" MinimumSymbolCharacters="1" 
MinimumUpperCaseCharacters="1" DisplayPosition="RightSide" />
于 2013-02-12T11:16:33.050 回答
0

缺少财产

CalculationWeightings="25;25;15;35" 

如果您将这些道具更改为 1,因为当前设置对我来说似乎不合逻辑

RequiresUpperAndLowerCaseCharacters="True"  
MinimumLowerCaseCharacters="0"
MinimumUpperCaseCharacters="0"

Label10 在吗?

于 2013-02-12T10:10:56.647 回答