How to allow html control inside a listitem?

  1. #1

    How to allow html control inside a listitem?

    The following compile error occurs:

    Parser Error Message: The 'Text' property of 'asp:ListItem' does not allow child objects.

    Source Error:
    
    Line 468:                        </asp:ListItem>
    Line 469:                        <asp:ListItem Value="3">
    Line 470:                         Search only continuing stories with at least&nbsp; <input runat="server" id="episodetb" Value="0" style="width:50px" />
    Line 471:                        episodes
    Line 472:                        </asp:ListItem>
    When my original code is like this:

     <asp:RadioButtonList ID="ContStoryRadioButtonList"  DataTextFormatString=" {0}" CellPadding="2" runat="server">
                            <asp:ListItem Value="0">
                            Search singular and continuing stories
                            </asp:ListItem>
                            <asp:ListItem Value="1">
                            Search only singular stories
                            </asp:ListItem>
                            <asp:ListItem Value="2">
                            Search only continuing stories
                            </asp:ListItem>
                            <asp:ListItem Value="3">
                             Search only continuing stories with at least&nbsp; <input runat="server" id="episodetb" Value="0" style="width:50px" />
                            episodes
                            </asp:ListItem>
                            </asp:RadioButtonList>
    Please help me with this. thx in advance
    Last edited by geoffrey.mcgill; Sep 16, 2010 at 9:25 PM. Reason: please use [CODE] tags
  2. #2
    Hi masudcseku,

    It would be best to post ASP.NET control related question in the ASP.NET forums, see http://forums.asp.net/
    Geoffrey McGill
    Founder

Similar Threads

  1. Replies: 7
    Last Post: Jan 29, 2013, 11:59 AM
  2. Html content inside panel
    By Birgit in forum 2.x Help
    Replies: 1
    Last Post: Apr 02, 2012, 2:34 PM
  3. [CLOSED] ext:ComboBox ListItem with html image tag
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 02, 2012, 12:58 PM
  4. Add html content inside ext:panel tags
    By kirkhas in forum 1.x Help
    Replies: 15
    Last Post: Aug 03, 2011, 10:19 PM
  5. html tags inside container
    By [WP]joju in forum 1.x Help
    Replies: 4
    Last Post: Nov 20, 2009, 2:39 AM

Tags for this Thread

Posting Permissions