views:

29

answers:

1

Hi, In my page ASP.net page I'm using a custom control like this:

<MyNamespace:MyControl runat="server" ID="myControl">
<contenttemplate>
This is the text I want to use
</contenttemplate>
</MyNamespace:MyControl>

In the c# code of the control how can I obtain a string containing the text between the <contentemplate> tag (eg. "This is the text I want to use") ? Can you give me the code?

Thank you!

+1  A: 

Check out How to make a templated control.

Greg B