J
joe_s
Hello,
I am working on an n-tier .NET application. The presentation is through aspx
pages and custom data-bound server controls which use templates to separate
interface from content.
In all the samples I've seen regarding such controls, the templates are
instantiated in a class which inherits [Web]Control and implements
INamingContainer (here's the QuickStart source which demonstrates this:
http://samples.gotdotnet.com/quickstart/util/srcview.aspx?path=/quickstart/a
spplus/samples/webforms/ctrlauth/templates/Repeater2.src&file=CS\Repeater2.c
s&font=3). This class has all the properties which will eventually be shown
on the page. What I want to know is if there is a way to accomplish the same
thing without this class.
This might seem strange, but the reason I'd like to do this, is that I've
already got a class with the same properties in my business logic layer, and
I don't want to create another almost identical class. It would make
maintenance a nightmare. I can't use this class directly in the
ITemplate.InstantiateIn() method because it does not inherit Control, or
implement any interface, and it shouldn't.
I hope I made myself clear. If you have any suggestions or questions, please
do not hesitate to reply.
Thank you,
Joe
I am working on an n-tier .NET application. The presentation is through aspx
pages and custom data-bound server controls which use templates to separate
interface from content.
In all the samples I've seen regarding such controls, the templates are
instantiated in a class which inherits [Web]Control and implements
INamingContainer (here's the QuickStart source which demonstrates this:
http://samples.gotdotnet.com/quickstart/util/srcview.aspx?path=/quickstart/a
spplus/samples/webforms/ctrlauth/templates/Repeater2.src&file=CS\Repeater2.c
s&font=3). This class has all the properties which will eventually be shown
on the page. What I want to know is if there is a way to accomplish the same
thing without this class.
This might seem strange, but the reason I'd like to do this, is that I've
already got a class with the same properties in my business logic layer, and
I don't want to create another almost identical class. It would make
maintenance a nightmare. I can't use this class directly in the
ITemplate.InstantiateIn() method because it does not inherit Control, or
implement any interface, and it shouldn't.
I hope I made myself clear. If you have any suggestions or questions, please
do not hesitate to reply.
Thank you,
Joe