I want to have the following HTML programmatically:
<ul><li><a href="#"></a></li></ul>
I can add <li> to <ul>. But <a> to <li> is not possible.
My code:
BulletedList ul = new BulletedList();
ListItem li = new ListItem();
HyperLink hl = new HyperLink();
ul.Items.Add(li);
// li has no property Controls or Items
From BulletedList, how to set link in ListItem, use the DisplayMode Property.
Or in your code: