Geeks With Blogs
Sreenivas Mogullapalli Microsoft Technologies Geek

In my ASP.NET application validators are used for validating the data entry part and as per the requirement we need to show a different color for error messages. We have created a CSS class for all the error message and applied to validators but noticed that the error messages are always displayed in RED color. The trick here is we also need to set the ForeColor to empty to get the color of text from CSS Class. Sample is provided below.

CssName="Someclass" ForeColor=""

 

Posted on Thursday, October 30, 2008 5:03 PM Microsoft , ASP.NET | Back to top


Comments on this post: Tip: Changing Validator text color using class name

# re: Tip: Changing Validator text color using class name
Requesting Gravatar...
recive skins for visual studio 2008
Left by moh on Nov 18, 2008 2:53 AM

# re: Tip: Changing Validator text color using class name
Requesting Gravatar...
The trick here is we also need to set the ForeColor to empty to get the color of text from CSS Class
Left by Seiko Kinetic on Nov 05, 2009 8:20 PM

Your comment:
 (will show your gravatar)


Copyright © Sreenivas Mogullapalli | Powered by: GeeksWithBlogs.net