Last post Oct 15, 2008 09:24 AM by Heleboel
Oct 13, 2008 03:18 PM|SonOfPirate|LINK
I am looking for suggestions how to implement the concept of a "Standard Commands" type control. What I'd like to be able to accomplish is the following:
<acme:StandardCommands ID="blah" runat="server" Command="Print" />
Under-the-hood, there is a PrintCommand server control that actually implements the necessary behaviro and rendering logic. Ideally, I'd like it is THAT was the object that was placed into the parent's Control heirarchy and not the StandardCommands object.
I'd just like this to simplify the mark-up code for my UI developers (rather than sorting through a list of controls that could be spread out because of alphabetic sorting, they just implement one control and select the command type from the enumerated Command
Any suggestions how to accomplish this so that the PrintCommand control is what I actually instantiate and store in the Controls collection?
Thanks in advance.
Oct 15, 2008 09:24 AM|Heleboel|LINK
My first thought was overriding the Render method. But after re-reading your post, it seems to me that you want to replace the control with a control of the appropriate type. I do not know if that is possible. So, I think overriding the Render method still
is the best approach.