我無法更改PasswordStrength控件的字體。我甚至嘗試爲它創造一個CSS類,如下所示:在ASP.net中更改PasswordStrength的字體
.PassWordFont {
font-size:12px;
font-family:Verdana;
}
,然後把它在類似這樣的標記
<asp:PasswordStrength ID="PasswordStrength1" runat="server"
TargetControlID="txtPassword1" DisplayPosition="RightSide"
StrengthIndicatorType="Text"
PreferredPasswordLength="15"
PrefixText="Strength:"
HelpStatusLabelID="lblLenIndicator"
TextStrengthDescriptions="Very Poor;Weak;Average;Strong;Excellent"
TextCssClass="PassWordFont"
StrengthStyles="PWSSVeryPoor; PWSSWeak; PWSSAverage; PWSSStrong; PWSSExcellent"
MinimumNumericCharacters="1"
MinimumSymbolCharacters="0"
RequiresUpperAndLowerCaseCharacters="false">
</asp:PasswordStrength>
我在做什麼錯?
你把這個CssClass放在哪裏?密碼強度控制內? – theNoobie
對不起,是的,我用它來代替TextCssClass。 –