title: hide multiple <li> list items in code-behind
body: <p>I have a very huge unordered list items in my masterpage. say it contains 60+ list items. depending on some condition i want hide that list items (hidden items could be 1 to 59 )</p>
  
  <p>My Master File Code Snippet :</p>
  
  <pre><code>&lt;li&gt;&lt;a href="#"&gt;Authorization&lt;/a&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;a href="NewCardGeneration.aspx"&gt;&lt;span&gt;Card Request&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="cardIssueAuth.aspx"&gt;&lt;span&gt;Card Issue&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="CardReloadAuth.aspx"&gt;&lt;span&gt;Card Reload&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="CloseCardAuth.aspx"&gt;&lt;span&gt;Close Card&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="CardReplacementAuth.aspx"&gt;&lt;span&gt;Card Replacement&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="CardStatuschangeAuth.aspx"&gt;&lt;span&gt;Card Status Change&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="UpgradeDowngradeAuth.aspx"&gt;&lt;span&gt;Upgrade/DownGrade&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>Condition : -</p>
  
  <p>My <code>DataTable</code> returns values like </p>
  
  <pre><code>cardIssueAuth.aspx
  Distributor.aspx
  CardStatuschangeAuth.aspx
  UpgradeDowngradeAuth.aspx
  </code></pre>
  
  <p><strong>So i want to hide only those page which came in <code>DataTable</code></strong></p>
  
  <p>I am aware of <code>ID</code>  &amp; <code>runat</code> attribute of <code>&lt;li&gt;</code> &amp; then make it <code>visible : false</code></p>
  
  <p>But how can i use it efficiently/dynamically ? by using some for loop ...!!</p>