locked
I want to put an asp dropdownlist withing an asp .net repeater.. having problems RRS feed

  • Question

  • good Friday to all you magical people with all the answers.

    I want to put an asp dropdownlist within an asp repeater and my vb code behind is not recognizing the dd list.  If I move it outside the repeater it works fine.  Any help is greatly appreciated.

    code below:

    <asp:Repeater runat="server" ID="rptPFEDocumentCategories" OnItemDataBound="DisplayDocuments">
    
    <ItemTemplate>
    <li style="list-style-type: none"><a id="<%#Container.DataItem("Line")%>"><%#Container.DataItem("Line")%></a></li>
           <asp:Repeater runat="server" ID="rptPFEDocuments" OnItemDataBound="DisplayStatesByForm">
                <HeaderTemplate>
                <ul>
                </HeaderTemplate>
                <ItemTemplate>
                <li style="list-style-type: circle">
                    <b>Number:</b>&nbsp;<%#Container.DataItem("FormNumber")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="/DesktopModules/PolicyFormsDocumentsModule/PFEImagePage.aspx?fn=<%#Server.UrlEncode(Container.DataItem("FormNumber"))%>&pfetype=pd">Word Format</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="/DesktopModules/PolicyFormsDocumentsModule/PFEImagePage.aspx?fn=<%#Server.UrlEncode(Container.DataItem("FormNumber"))%>&pfetype=pp">PDF Format</a>
                </li>
                <li style="list-style-type: circle">
                    <b>Title:</b>&nbsp;<%#Container.DataItem("Title")%> 
                </li>
                <li>
                    <asp:DropDownList ID="ddlMechanisms" runat="server"  ></asp:DropDownList>
                </li>
                </ItemTemplate>
                <SeparatorTemplate><hr /></SeparatorTemplate>
                <FooterTemplate>
                </ul>
                
                </FooterTemplate>
                </asp:Repeater>
    </ItemTemplate>
    <SeparatorTemplate><p /></SeparatorTemplate>
    </asp:Repeater>
    


    shash

    • Moved by Mike Feng Monday, April 29, 2013 7:43 AM
    Friday, April 26, 2013 1:51 PM

All replies

  • Repeater is made of table , tr , td and not ul, li . Kindly refer this link for details.
    Sunday, April 28, 2013 3:57 AM
  • This is the wrong forum. WWW.ASP.NET.

    Renee


    "MODERN PROGRAMMING is deficient in elementary ways BECAUSE of problems INTRODUCED by MODERN PROGRAMMING." Me

    Sunday, April 28, 2013 3:59 AM
  • My suggestion will be, use DropDown list outside the <li> </li> tags.

    Please refer to the following article where you will get the full idea about Asp.Net Repeater Control.

    Asp.Net Repeater Control.


    • Edited by Dvorkin Wednesday, April 9, 2014 3:20 PM
    Wednesday, April 9, 2014 3:17 PM