foreach loop issue
<p>branch is of checkbox list type, but while looping through this it adds only one item while i want to store all "li" in branch_id and want to retrive later why it's not adding all in branch_is. is there any other option which can add all this to variable branch_id.    </p>

<pre><code>          foreach (ListItem li in branch.Items) 
                {
                    if(li.Selected)
                    {

                        List&lt;int&gt; branch_id = new List&lt;int&gt;();
                        branch_id.Add(Convert.ToInt32(li.Value));

                    }
                } 
</code></pre>
