Custom Control - Inherits question

S

Seth Williams

I'm creating a custom control, that inherits from an already existing
ASP.Net control.
However, I don't want all the properties available.

How can I code this, in the new control?
 
T

Teemu Keiski

Hi,

one way solve this is make the new control not to derive from the base
control anymore, but instead have it (ex-base class) as composite e.g member
in the new control and creating the properties etc you need, and wrap them
to the contained control (means some monkey-code). Basically the control is
then child control instead of being a base class.

This allows you to define the interface you want, and still have the needed
capabilities.
 

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,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top