Hello all. Could use a little help.
I have an e-commerce app where I created a stored proc to retrieve Parent and Child Categories, then I used a DataList for the Parent Cats, and a Repeater for the Sub-Cats.
Works like a charm, but I can't style them correctly using a suckerfish css menu style I'd like to use.
Here's my code:
1 <asp:DataList id="dlMainCat" runat="server" DataKeyField="uid">
2 <ItemTemplate>
3 <A href=SearchResult.aspx?CategoryID=<%# DataBinder.Eval(Container.DataItem, "uid") %>><%# DataBinder.Eval(Container.DataItem, "Name") %></a>
4 <asp:Repeater id="rptSubCategory" runat="server">
5 <ItemTemplate>
6 <A href=SearchResult.aspx?CategoryID=<%# DataBinder.Eval(Container.DataItem, "uid") %>><%# DataBinder.Eval(Container.DataItem, "Name") %></A>
7 </ItemTemplate>
8 </asp:Repeater>
9 </ItemTemplate>
10 </asp:DataList>
My problem is this
On line 3, I have the first line of the Parent Categories
On line 4, I insert my repeater for the Sub-Categories
Ok, my problem is this, I wan to list these as a list
<ul>
<li>Parent Cat</li>
<ul>
<li>Sub-Cat</li>
</ul>
</ul>
But I can't wrap my head around it.
Where do I introduce the <ul> tag then the <li> tag?
Any help?
Paranoid. Nah, it's just that everybody is out to get me.