What makes a control able to be validated?

C

Chris Kettenbach

Does a control need to inherit an interface to be "validatable" :)? I have
a custom control ascx file. I want to name it as the control to be
validated by an asp:validator. When I do that, I get an error that says the
control can't be named as a controltovalidate. Any suggestions?

Thanks,
Chris
 
T

Tod Birdsall, MCSD for .NET

Hi Chris,

You can't validate a User Control using a standard ASP.NET validator
control. If you are trying to validate a Textbox, or something similar,
that is in the User Control, you will need to tell the validator the ID
of that control.

The following thread should answer your question:

http://tinyurl.com/7l6df

Hope this helps,

Tod Birdsall, MCSD for .NET
blog: http://tod1d.blogspot.com
 
G

Guest

User controls cannot be validated...
If you inherit a web control to build your own control,say by inheriting a
TextBox or ListBox class, validators will work on them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top