Groups | Blog | Home
all groups > asp.net building controls > october 2003 >

asp.net building controls : I know this is simple to do, but can't quite get it


Kevin Blakeley
10/31/2003 10:01:06 AM
I am just starting to play around with creating server controls and I want
to do something similar to the panel control. I want my control to output a
Div tag and then based on the contents of what is put between the tags of my
server control, I want to render that content in between my div. I want to
allow people to put straight HTML or use any server control. So something
like this:

<cc1:CtrlTest id="CtrlTest1" runat="server">
<ASP:BUTTON Runat="server" Text="test"></ASP:BUTTON>
</cc1:CtrlTest>

I have been through a number of samples on MSDN and other sites and
everything I have tried doesn't work quite the way I want.

Any help would be great.
Thanks
Kevin

NoOne
10/31/2003 12:54:51 PM
Look at using ParseChildrenAttribute and PersistChildrenAttribute as
attributes for your control.

- J


[quoted text, click to view]

AddThis Social Bookmark Button