J
Jonathan Wood
I have a master page that contains a BulletedList.
<asp:BulletedList runat="server" id="mainmenu" CssClass="nav">
</asp:BulletedList>
In my page's Load event, I'm populating the bulleted list based on the role
of the current user. Right now, my test code looks like this:
for (int i = 0; i < 8; i++)
{
ListItem item = new ListItem();
item.Text = String.Format("Menu Item {0}", i + 1);
mainmenu.Items.Add(item);
}
The problem is I want to insert an <a> tag so that each list item is a link.
Does anyone know how to dynmically add items to a BulletedList that include
HTML markup?
Thanks.
<asp:BulletedList runat="server" id="mainmenu" CssClass="nav">
</asp:BulletedList>
In my page's Load event, I'm populating the bulleted list based on the role
of the current user. Right now, my test code looks like this:
for (int i = 0; i < 8; i++)
{
ListItem item = new ListItem();
item.Text = String.Format("Menu Item {0}", i + 1);
mainmenu.Items.Add(item);
}
The problem is I want to insert an <a> tag so that each list item is a link.
Does anyone know how to dynmically add items to a BulletedList that include
HTML markup?
Thanks.