Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   Validation Controls : .ErrorMessage & .Text relationship (http://www.velocityreviews.com/forums/t775579-validation-controls-errormessage-and-text-relationship.html)

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?

Thanks,
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:
http://svn.myrealbox.com/viewcvs/tru...9994&view=auto


--
Cheers,
Gaurav Vaish
http://www.mastergaurav.org
http://mastergaurav.blogspot.com
-------------------------



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.