开发者

Change Fore Color in RegularExpression validation error message

How can I change the fore color of the error message programatically?

   RegularExpressionValidator errorExp = new RegularExpressionValidator();
   Err开发者_开发问答orExp.ErrorMessage = "You entered invalid data"; (Force it to be blue?)

Thank you


There is a ForeColor property, according to the documentation, which just sets an inline style, but I would recommend setting a value for CssClass and specifying your desired color in a style sheet.


errorExp.ForeColor = Color.Blue;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜