score:0

Maybe you could change your list to use the ASP listitem control, which would allow you to...

Try something like this. Using is to cast a control for testing is efficient.

  foreach (Control c in Page.Controls)
    {
        if (c is ListItem)
        {
            //do something with the control
        }
    }

score:1

I tested this and added some <li>'s manually. I could get them to show up if I set runat="server" in their tag. So the code you're using to generate and add the ListItems is not creating them with the runat.

Edit
You made need to consider using an actual ASP .NET Control such as a DataGrid or Repeater or BulletedList as MAW74656 suggested instead of HTML <ul>'s.


Related Articles