Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Literal content is not allowed within a CustomControl?

Reply
Thread Tools

Literal content is not allowed within a CustomControl?

 
 
Dave
Guest
Posts: n/a
 
      08-02-2006
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>

 
Reply With Quote
 
 
 
 
Dave
Guest
Posts: n/a
 
      08-02-2006
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.

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

"Dave" wrote:

> 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>
>

 
Reply With Quote
 
 
 
 
Dave
Guest
Posts: n/a
 
      08-02-2006
Nevermind...I found the solution here
http://msdn.microsoft.com/library/de...entrotator.asp

"Dave" wrote:

> 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.
>
> <aspropDownList ID="ddwn1" runat=server>
> <asp:ListItem Value="1">One</asp:ListItem>
> <asp:ListItem Value="2">Two</asp:ListItem>
> </aspropDownList>
>
> "Dave" wrote:
>
> > 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>
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Literal content is not allowed within a UserControl Ahsan Umair ASP .Net Web Controls 1 07-17-2008 10:09 PM
ERROR: Literal content ('<asp:ListItem Selected="') is not allowed within a 'System.Web.UI.WebControls.ListItemCollection' (REPOST) John Smith ASP .Net 0 06-07-2006 07:24 AM
Literal content ('<asp:ListItem Selected="') is not allowed within a 'System.Web.UI.WebControls.ListItemCollection' John Smith ASP .Net 0 06-06-2006 07:58 AM
Weird error - Literal content is not allowed within a 'skin file' Alan Silver ASP .Net 1 01-26-2006 10:43 PM
"Literal content is not allowed within a user control"? =?Utf-8?B?RGF2ZQ==?= ASP .Net 0 05-17-2004 03:21 AM



Advertisments