Velocity Reviews

Velocity Reviews (
-   ASP .Net Web Controls (
-   -   Validation Controls : .ErrorMessage & .Text relationship (

Andrew Backer 03-08-2005 07:48 PM

Validation Controls : .ErrorMessage & .Text relationship
Can anyone elaborate on the BaseValidator class and the
ErrorMessage/Text properties.

I am inheriting from BaseValidator, and in EvaluateIsValid() I set the
ErrorMessage property of the base. It appears that the Text property
overrides this, though, if it is set.

How should I handle these? It seems that ErrorMessage/Text are both
shown under the same conditions (error!), but that Text takes
precedence. If this is they case, why is there an ErrorMessage prop?

Andrew Backer

MasterGaurav 03-09-2005 04:08 PM

Re: Validation Controls : .ErrorMessage & .Text relationship
BaseValidator is derived from Label.
ErrorMessage is just the convinient name. Besides, Text may take
precedence also if the validator has controls within itself (some
validators may allow nested controls).

You may like to have a look at:

Gaurav Vaish

All times are GMT. The time now is 11:08 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.