c# - Is there an easy method of finding Validators relating to an input control? -


i've been searching google past couple of hours try find way of returning validators relating input control. maybe i'm phrasing incorrectly or not possible.

i know there collection of validators accessible via page.validators, want this:

var myvalidators = page.validators.where(x => x.controltovalidate = "abcdef"); 

any ideas?

page.validators holds collection of ivalidator, validators derive basevalidator, has controltovalidate property, can this:

var myvalidators = page.validators.oftype<basevalidator>                                   .where(x => x.controltovalidate == "abcdef"); 

Comments