Adding list controls to panel in c#
<p>I have a panel .
 in my Db i have a list of persons .. 
for each person in run time i add different attributes under them .
 i want all the persons to be list as a list (separate list for each person ) . i will add values later . </p>

<p>here is my .aspx code</p>

<pre><code> &lt;asp:Panel ID="DR_list" runat="server" Direction="LeftToRight" Height="227px" 
        HorizontalAlign="Center" ScrollBars="Horizontal" Wrap="False"&gt;
        &lt;asp:ListView &gt;
        &lt;/asp:ListView&gt;
    &lt;/asp:Panel&gt;
</code></pre>

<p>my c # code is </p>

<pre><code>         SqlDataReader myReader = null;
         SqlCommand myCommand = new SqlCommand("select drname from --- ",
                                                  myConnection);
         myReader = myCommand.ExecuteReader();
         while (myReader.Read())
         {
             //Response.Write(myReader["DrName"].ToString());
             int tRows;  
               int tCells;
             List&lt;string&gt; DrNames = new List&lt;string&gt;();

             for (tCells = 0; tCells &lt; 4; tCells++)
              {
                  string a = myReader["DrName"].ToString();
                  Response.Write(a);
                    DrNames.Add(a);

              }

             DR_list.Controls.Add(DrNames);

         }
     }
</code></pre>

<p>please help me .. thanks in advance</p>
