Hi,
I have a repeater which looks like so:
<HeaderTemplate>
<div>
</HeaderTemplate>
<ItemTemplate>
<asp:PlaceHolder runat="server" id="plhContent"/>
</ItemTemplate>
<FooterTemplate>
</div>
</FooterTemplate>
I then have a dataset that looks like:
Title | Category
"Title1","Legal"
"Title2","Legal"
"Title3","Finance"
"Title4","Accounting"
The dataset is sorted by the category.
And the output im trying to achieve is:
<div><!-- from headertemplate -->
<div id="legal">
<ul>
<li>Title 1</li>
<li>Title 2</li>
</ul>
</div><!--end legal div-->
<div id="Finance">
<ul>
<li>Title 3</li>
</ul>
</div><!--end finance div-->
<div id="Accounting">
<ul>
<li>Title 4</li>
</ul>
</div><!--end accounting div-->
</div><!-- from footertemplate -->
However I'm really struggling with the logic. Within my code i've essentially got:
Add a bulleted list
Add a listitem
But this poses a problem for the row "title2" because it doesnt require a new bulleted list, it just requires a new listitem to be added to the bulleted list in the previous iteration of the repeater.
How can i possibly do this?
Thanks in advance Al