Hello,
I need to display a list of categories on the left side of a page, and
I am confused how I would do this using a List Control (as appose to
weaving my own HTML on the server side).
My HTML should look like:
<ul>
<li><a href="">Category</a>
<ul>
<li><a href="">Sub Category 1</a></li>
<li><a href="">Sub Category 2</a></li>
</ul>
</li>
<li><a href="">Category2</a>
<ul>
<li><a href="">Sub Category 1</a></li>
</ul>
</li>
</ul>
To make things complicated, maybe I want to ONLY show the top level
categories (Category, Category2). I also might want to highlight the
currently selected category.
If it was up to me, I would just do this using a StringBuilder in the
codebehind, but one of my requirements is that it has to be easy for
the web designers to go in and change the HTML markup.