Access Unordered list control id's in codebehind
<p>I have ul elements in usercontrol like below</p>

<pre><code>&lt;u&gt;&lt;ul&gt;
  &lt;li id="liMiddle" class="off"&gt;
                    &lt;a href="#"&gt;One
                    &lt;/a&gt;
                    &lt;ul id="One" runat="server"&gt;

                &lt;/ul&gt;
              &lt;/li&gt;
              &lt;li id="liMiddle" class="off"&gt;
                &lt;a href="#"&gt;Two
                &lt;/a&gt;
                &lt;ul id="Two" runat="server"&gt;

                &lt;/ul&gt;
              &lt;/li&gt;
              &lt;li id="liMiddle" class="off"&gt;
                &lt;a href="#"&gt;Three
                &lt;/a&gt;
                &lt;ul id="Three" runat="server"&gt;

                &lt;/ul&gt;
</code></pre>

<p></p>

<p>foreach (SPWeb supersubsite in subsites)
                        {
                            int i = 0;
                            HtmlGenericControl li = new  HtmlGenericControl("li");</p>

<pre><code>                        CurrentTab.Controls.Add(li);

                        HtmlGenericControl anchor = new HtmlGenericControl("a");
                        anchor.Attributes.Add("href", supersubsite.Url);
                        anchor.InnerText = supersubsite.Title;
                        li.Controls.Add(anchor);
                       } &lt;/u&gt; 
</code></pre>

<p>Here in each loop Current tab should be changed to corresponding next ul id. How to access it?</p>

<p>I have to generate 'li' elements dynamically under above ul's. So I need to access all the 'ul' id's one by one in the codebehind.</p>

<p>Can anybody tell me the solution?</p>
