Option 1
Since you are using ASP.NET WebForms, you have access to the Menu
control.
I wrote an article about writing a dynamic SiteMapDataSource
, you can take the concepts there and apply them to create a menu. (A menu can be data-bound using a SiteMapDataSource
)
If you use ASP.NET 4.5 and WebForms, you can configure the Menu control to render <ul> <li>
elements:
Example In (web.config file):
<pages controlRenderingCompatibilityVersion="4.5">
The above line will render a Menu
control using <ul>
and <li>
elements
Option 2
Use the BulletedList
control. This control renders automatically <ul>
lists:
<asp:BulletedList runat="server" DisplayMode="HyperLink" BulletStyle="LowerAlpha">
</asp:BulletedList>
Option 3
An alternative approach is to use HTML lists using <ul>
and <li>
And then just use CSS styles to create the effect you want
References
NOTE: In any case, I strongly recommend you to read my blog about dynamic SiteMapProviders
Take a look by yourself: