Is it possible to add the heading for each menu list?
Something like:
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<h3><%# Eval("Country") %><h3>
<ul>
</HeaderTemplate>
<ItemTemplate>
<li>
<%# Eval("CityName") %>
</li>
</ItemTemplate>
</asp:Repeater>
So that you have something like:
Country 1
City 1
City 2
Country 2
City 1
City 2
Country 3
City 1
City 2
and so on. This is a single query derived from 2 tables: Countries & Cities.
I could not figure out how. Maybe something like the Java one ( How to display menu items from database ) but I am using SQL Server.
Can someone help please!
Many thanks in advance,
Quin
Just change it so that it is 2 queries and put a repeater within your repeater. Get the country and cities seperately, in your rowdatabound event of the country repeater, filter the cities to the current country and binf the inner repeater to that.