Can a "开发者_如何学Pythonasp:PasswordStrength" control be customized to show different images for different "StrengthStyles="weak; average; strong" (separate image for each strength).
I am not able to upload a sample image as I am a new user. Sorry for that.
Kindly help, Thanks, Eswar
You can use the StrengthStyles property to provide a list of CSS classes that will be applied to the indicator depending on the current password's strength. Then, you can use the background-image CSS property to associate an image with each class:
.weak {
background-image: url(images/weak.png);
}
.average {
background-image: url(images/average.png);
}
.strong {
background-image: url(images/strong.png);
}
<asp:PasswordStrength ID="yourPasswordStrength" runat="server"
TargetControlID="yourTextBox" StrengthStyles="weak;average;strong" />
If you are looking to display it as a bar indicator you can also apply backgrounds to them. See the following article for sample code...
http://www.datasprings.com/resources/articles-information/ajax-password-strength-control
精彩评论