How to get controls from panel in asp.net c#?
<p>Well, I am doing a project on online movie ticket booking.</p>

<p>My problem is, I want to show the seating arrangement in a screen of a particular theater.</p>

<p>As in every row the number of seats can vary so what I have done is add a panel and in it a checkboxlist is dynamically added during runtime. </p>

<p>each checkboxlist represents a single row.</p>

<pre><code>string s;

for (int i = 0; i &lt; ds.Tables["row_id_no_of_seats"].Rows.Count; i++)
{
    cbl = new CheckBoxList();
    cbl.RepeatDirection = 0; //horizontal
    cbl.RepeatLayout = 0; //table
    cbl.RepeatColumns = (int)ds.Tables["row_id_no_of_seats"].Rows[i].ItemArray[1];
    Panel1.Controls.Add(cbl);

    for(int j=1;j&lt;=(int)ds.Tables["row_id_no_of_seats"].Rows[i].ItemArray[1];j++)
    {
         s = ds.Tables["row_id_no_of_seats"].Rows[i].ItemArray[0].ToString() + j.ToString(); //ex:A+1
         cbl.Items.Add(s);

         string query1 = "select booking_detail.row_id,booking_detail.column_id from booking_detail,booking where (booking_detail.booking_id=booking.booking_id) and (booking_detail.booking_date='" + bk_date + "') and (booking.booking_date='" + bk_date + "') and (booking.theatre_id=" + theatre_id + ") and (booking.screen_id=" + screen_id + ") and (booking.movie_id=" + movie_id + ") and (booking.show_start_time='" + show_start_time + "') and (booking.class_id=" + class_id + ")";

         SqlCommand command1 = new SqlCommand(query1, connection);

         adapter.SelectCommand = command1;
         adapter.Fill(ds, "seat_booked_info");

         // it checks and disables  the seats which have been pre- booked.
         for (int k = 0; k &lt; ds.Tables["seat_booked_info"].Rows.Count;k++) {
             if(ds.Tables["seat_booked_info"].Rows[k].ItemArray[0].ToString().Equals(ds.Tables["row_id_no_of_seats"].Rows[i].ItemArray[0].ToString())) &amp;&amp; (ds.Tables["seat_booked_info"].Rows[k].ItemArray[1].ToString().Equals(j.ToString())))
             {
                 cbl.Items.FindByText(s).Selected=true;        
                 cbl.Items.FindByText(s).Enabled = false;

             }
         }
         ds.Tables["seat_booked_info"].Clear();
    }
}
</code></pre>

<p>Now what I want is, how do I get the details of the checkbox which have been selected by the user as the checkboxlist are dynamically added to the panel?</p>
