Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Easy access to the control specified in a validator's ControlToValidate property

Reply
Thread Tools

Easy access to the control specified in a validator's ControlToValidate property

 
 
Nathan Sokalski
Guest
Posts: n/a
 
      03-08-2010
I have a custom validator that inherits from BaseValidator, and I need to be
able to access the control specified by the ControlToValidate property. The
only way I have been able to find to do this is to recursively use the
FindControl method, which can sometimes be inefficient depending on where
the control is located. I'm sure I'm not the first person to want to access
the ControlToValidate control in a custom validator, so does anybody know of
a more efficient way? Thanks.
--
Nathan Sokalski
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.nathansokalski.com/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing the ControlToValidate control in a Validator Nathan Sokalski ASP .Net 1 05-20-2008 10:49 PM
controltovalidate property of customvalidator is incorrect TS ASP .Net Web Controls 7 07-19-2007 04:37 PM
Custom Control needs ControlToValidate Steven Nagy ASP .Net 4 05-08-2007 03:56 AM
controlToValidate property of compareValidator TS ASP .Net Web Controls 1 01-03-2006 03:29 AM
How to implement a property like ControlToValidate property? Jeff ASP .Net Web Controls 6 05-02-2005 01:49 PM



Advertisments