0

I am having a dropdown, in the ascx like this,

 <li id="liProducts" class="nav2" runat="server"><a id="lnkProducts" href="../ProductList" runat="server">Products</a>


<asp:Literal ID="ltlSubMenu" runat="server"></asp:Literal>

<asp:Literal ID="Literal1" runat="server"></asp:Literal>

</li>

The vb code for this is as follows,

  strli = strli & "<li><a href='/ProductGallery/" & dt.Rows(i).Item(4).ToString() & "' >" & If(dt.Rows(i).Item(0).ToString.Length > 27, dt.Rows(i).Item(0).ToString.Substring(0, 27) & "...", dt.Rows(i).Item(0)) & "</a></li>"



ltlSubMenu.Text = "<ul class='liProductsSub' style='display:none'><div class='menuheight'>" & strli & "</div><li class='productViewMore'><a href='/ProductList'>View More >></a></li></ul>"

My question is how do I display a hierarchy of dropdown i.e. dropdown's inside of another dropdown in this kind of architecture. Thank you.

  • Take a look at https://stackoverflow.com/questions/1037732/nesting-optgroups-in-a-dropdownlist-select – John Jun 28 '17 at 10:56
  • It is for two level indentation John, I want it to be dynamic i.e. the whole tree should be displayed in the dropdown. Thank you – user7749322 Jun 28 '17 at 11:29

0 Answers0