Repeater Question

E

erin.sebastian

Hello All,
I have created a web page. At the top of the page there are 4 links;
upon clicking on one of the links it brings up the left hand side menu,
it's a repeater that loops through items selected from the database
based on the id of the link chosen from the link at the top of the
page. The page that displays the information is the same page for each
menu item as the details are stored in the database and selected based
on the id number of the menu item. The code that displays the left hand
menu is at the bottom of this page.

My problem is this: When the second of the 4 top menu links is
selected, i would like the left hand menu to display unrelated links
but i want it to appear that it's a part of the main left hand menu. So
it will be the normal repeater PLUS a second repeater to display this
extra information. I have no idea how to do this ?? any suggestions?


<ul>
<asp:Repeater id="rptSectionDetS" Visible="False" runat="server"
onItemDataBound="ShowSubSections">
<ItemTemplate>
<li <%# validSec(DataBinder.Eval(Container.DataItem,
"sectionId").ToString()) ? "class='current'" : " class=''" %>><a
href="section<%# DataBinder.Eval(Container.DataItem, "layoutId")
%>.aspx?id=<%# DataBinder.Eval(Container.DataItem, "sectionId") %>"><%#
DataBinder.Eval(Container.DataItem, "title") %></a></li>
<asp:Repeater id="rptSubSections" Visible='<%#
validSec(DataBinder.Eval(Container.DataItem, "sectionId").ToString())
%>' runat="server" onItemDataBound="ShowSubPages">
<ItemTemplate>
<li <%# validSubSec(DataBinder.Eval(Container.DataItem,
"subsectionId").ToString()) ? "class='level1hl'" : " class='level1'"
%>><a href="subsection<%# DataBinder.Eval(Container.DataItem,
"layoutId") %>.aspx?id=<%# DataBinder.Eval(Container.DataItem,
"subsectionId") %>"><%# DataBinder.Eval(Container.DataItem, "title")
%></a></li>
<asp:Repeater id="rptSubPages" Visible='<%#
(validSubSec(DataBinder.Eval(Container.DataItem,
"subsectionId").ToString())) %>' runat="server">
<ItemTemplate>
<li class="level2"><a href="subpage<%#
DataBinder.Eval(Container.DataItem, "layoutId") %>.aspx?id=<%#
DataBinder.Eval(Container.DataItem, "subpageid") %>"><%#
DataBinder.Eval(Container.DataItem, "title") %></a></li>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
</ul>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top