Panel control derived from WebControl
-
Hi all, I'm trying to create a custom web control which inherits directly from WebControl. I would like to be able to drop other server controls onto this in the WebForm designer, in the same way you can with System.Web.UI.WebControls.Panel. I know it's something to do with Parse/PersistChildren attributes, but I can't figure it out!! Anyone know how to do this? Thanks in advance, Simon. :)
-
Hi all, I'm trying to create a custom web control which inherits directly from WebControl. I would like to be able to drop other server controls onto this in the WebForm designer, in the same way you can with System.Web.UI.WebControls.Panel. I know it's something to do with Parse/PersistChildren attributes, but I can't figure it out!! Anyone know how to do this? Thanks in advance, Simon. :)
The way I would try to do it is by making a templated control along with a designer class for the control. If you have access to Kothari and Datye's book, "Developing ASP.NET Server Controls and Components", they have an example of a templated control starting on page 321 and later make a designer class for this control on page 386. hth, Orange