S
sonic
Hello,
I am trying to create a custom control hierarchy that encapsulates web
controls in my framework and run into a interesting problem.
my framework will automatically save all user control
values/preferences and initiate them from query string. My framework
will provide all necessary work and all the developers will have to do
is:
<myCo:CustomTextbox id="myText" runat="server" />
or
<myCo:CustomDropDown id="myDropDown" runat="server" />
and everything will be handled.
to achieve this, all of my controls would inherit from
CustomBaseControl which inherits WebControl, and adds additional
methods/events for improved personalization etc..
it works great, accept the web control strong typing is lost during the
declaration of the custom controls since they all inherit webcontrol.
so i cannot do
<myCo:CustomTextBox id="myText" runat="server" Text="this will berak"
/>
since c# does not support multiple inheritance, i have a choice of
inheriting from TextBox, and my own interface which would ensure that
all custom controls would implement necessary methods/event, or
inheriting from baseclass which will provide all of my controls with
common functionality, and running into the problem above.
any thoughts ?
I am trying to create a custom control hierarchy that encapsulates web
controls in my framework and run into a interesting problem.
my framework will automatically save all user control
values/preferences and initiate them from query string. My framework
will provide all necessary work and all the developers will have to do
is:
<myCo:CustomTextbox id="myText" runat="server" />
or
<myCo:CustomDropDown id="myDropDown" runat="server" />
and everything will be handled.
to achieve this, all of my controls would inherit from
CustomBaseControl which inherits WebControl, and adds additional
methods/events for improved personalization etc..
it works great, accept the web control strong typing is lost during the
declaration of the custom controls since they all inherit webcontrol.
so i cannot do
<myCo:CustomTextBox id="myText" runat="server" Text="this will berak"
/>
since c# does not support multiple inheritance, i have a choice of
inheriting from TextBox, and my own interface which would ensure that
all custom controls would implement necessary methods/event, or
inheriting from baseclass which will provide all of my controls with
common functionality, and running into the problem above.
any thoughts ?