c# - Extending a WebControl using a partial class -
is possible extend, instance, hyperlink control using partial class?
i'd define custom properties on control, without having extend class... so...
<asp:hyperlink runat="server" custompropertya="a" custompropertyb="b" />
and able use them on oninit/onpreload etc.
no. partial types only allow specify code type within multiple source files within same project. that's all. they're compile-time change - don't affect object model, or can types exist etc.
it sounds may want create new class derived hyperlink
instead.
Comments
Post a Comment