Literal content is not allowed within a CustomControl?

Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

    Default Literal content is not allowed within a CustomControl?

    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>

    Dave Guest

  2. Similar Questions and Discussions

    1. Content is not allowed in prolog
      I try php code attached (tree_source.php), but, in Flex Builder 3 application, line 43: <mx:XML id="dp" source="data/tree_source.php" /> Flex...
    2. Ignore literal content when parsing custom control children?
      Hi, I'm sure this has been asked before... Is there a setting or attribute that I can specify on my control to tell the page parser to ignore...
    3. Problem overriding render method to format literal content of nested tags in custom control
      Peter, I was under the mistaken impression that I was already overriding CreateChildControls to create the controls with the code: protected...
    4. Adding literal content to webcontrol via editor
      Hi Experts. I developed a menu webcontrol, which can be constrcuted by inline XML, something like that: <cc1:menu runat=server id=....>...
  3. #2

    Default RE: Literal content is not allowed within a CustomControl?

    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" 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>
    >
    Dave Guest

  4. #3

    Default RE: Literal content is not allowed within a CustomControl?

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

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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139