Tuesday, November 16, 2004

VJs Tip Of The Day - November 16th 2004

Whidbey Days - BaseValidator.ValidationGroup property

I am not sure how many of you have thought about this but many a times there use to be scenarios when you wanted that not all the validation controls on the page behave and validate in the same set... So here is the option for you... There is a property in Whidbey BaseValidator which is called ValidationGroup...
This property takes a string value and is a easy way to group your different validation controls in a group...

As this is a property of BaseValidator it is automatically inherited in all the rest of the validation controls...

How to visualize the use of it... Say for example I have a text box and I have a range validator, required field validator, regular expression validator all associated with it... I want to group all of these validators together then I set all of their ValidationGroup property to a fixed value and then they get grouped... Easy isn't it...

PS: "Tangential Theory" - This a new word coined by me... What does a tangential theory means? Well tangential theory is a philosophical theory of special kind... It is a theory or a thought which might touch you but will probably not effect you or intersect you often... It is a theory which will give you a chance to think about and conclude whether it does interset your mind waves just at a tangent or will eventually somewhere intersect to create a larger impact... In nutshell, Tangential Theory gives you the point from which you can start analyzing... I would refer many of the PS: that come along the technical tips as tangents of the tangential theory... Enough for now right!!

No comments: