I know this is simple to do, but can't quite get it

K

Kevin Blakeley

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
 
N

NoOne

Look at using ParseChildrenAttribute and PersistChildrenAttribute as
attributes for your control.

- J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top