Literal content is not allowed within a CustomControl?

D

Dave

Is there a way to put content between tags of a custom control so that it
will populate the defaultproperty such as my TabLabel property? When I tried
to put values between the tags I got the error.

I have ParseChildren as ParseChildren(true, "Tabs")] where Tabs are part of
a tab strip I declare below. The DropDownList control allows this with it's
Value property and I'm wondering how it works...

<cc1:tabstrip id="TabStrip1" runat="server">
<cc1:Tab TabLabel="One">One</cc1:Tab>
<cc1:Tab TabLabel="Two">Two</cc1:Tab>
</cc1:tabstrip>
 
D

Dave

Actually what I meant to say was the ListItem of the DropDownList control
allows it's Text property to be mapped to what ever inner content is defined.

<asp:DropDownList ID="ddwn1" runat=server>
<asp:ListItem Value="1">One</asp:ListItem>
<asp:ListItem Value="2">Two</asp:ListItem>
</asp:DropDownList>
 
D

Dave

Nevermind...I found the solution here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/contentrotator.asp

Dave said:
Actually what I meant to say was the ListItem of the DropDownList control
allows it's Text property to be mapped to what ever inner content is defined.

<asp:DropDownList ID="ddwn1" runat=server>
<asp:ListItem Value="1">One</asp:ListItem>
<asp:ListItem Value="2">Two</asp:ListItem>
</asp:DropDownList>

Dave said:
Is there a way to put content between tags of a custom control so that it
will populate the defaultproperty such as my TabLabel property? When I tried
to put values between the tags I got the error.

I have ParseChildren as ParseChildren(true, "Tabs")] where Tabs are part of
a tab strip I declare below. The DropDownList control allows this with it's
Value property and I'm wondering how it works...

<cc1:tabstrip id="TabStrip1" runat="server">
<cc1:Tab TabLabel="One">One</cc1:Tab>
<cc1:Tab TabLabel="Two">Two</cc1:Tab>
</cc1:tabstrip>
 

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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top