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">
    <li style="list-style-type: none"><a id="<%#Container.DataItem("Line")%>"><%#Container.DataItem("Line")%></a></li>
           <asp:Repeater runat="server" ID="rptPFEDocuments" OnItemDataBound="DisplayStatesByForm">
                <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 style="list-style-type: circle">
                    <asp:DropDownList ID="ddlMechanisms" runat="server"  ></asp:DropDownList>
                <SeparatorTemplate><hr /></SeparatorTemplate>
    <SeparatorTemplate><p /></SeparatorTemplate>


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


    "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