Using controls as property of a custom control

T

Tulga Kalayci

Hi,
I have created a web custom control. I want to be able to select one
of the other controls on my form as one the properties of my custom
control. Similar to validation control's ControlToValidate property.
How can I do this? Any help will be appreciated.
Thanks

Tulga
 
T

Teemu Keiski

Hi,

you need to attach a custom typeconverter to the property. Typeconverter is
capable to provide the list of controls on the Page. Here is an example:
http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=214342

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke


Hi,
I have created a web custom control. I want to be able to select one
of the other controls on my form as one the properties of my custom
control. Similar to validation control's ControlToValidate property.
How can I do this? Any help will be appreciated.
Thanks

Tulga
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top