470,591 Members | 1,458 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

Validationgroups and IValidator problem (ASP.NET 2.0)

Hi all,

I have a serious problem with asp.net validation: I developed a custom
validation summary control, which will lookup error messages from an external
source based on the BaseValidator.ErrorMessage property. This validation
summary control has a custom method which will add a dummy validator (which
will always evaluate to false) to the Page.Validators collection. The dummy
validator implements the IValidator interface, and this structure worked fine
on ASP.NET 1.1.

However, ASP.NET 2.0 supports validation groups, so I decided to add a
custom 'ValidationGroup' property to the dummy validator class, because I
want my custom validation summary control to support this much-welcomed
feature. The problem is that the Page.GetValidators(string validationGroup)
will loop through the page's Validators collection and cast each validator to
a BaseValidator! This way, my custom validator is casted to a null value and
won't be added to the collection of validators returned by the
Page.GetValidators method.

Does anybody have any suggestions how to resolve this?

TIA,

Arnold Jan van der Burg
MCSD
Dec 9 '05 #1
0 1225

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by masonj | last post: by
reply views Thread by Georgeo Pulikkathara[MS] | last post: by
1 post views Thread by brantman | last post: by
1 post views Thread by COHENMARVIN | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.