inserting arraylist values into database
<p>i have used a checkbox list in my project .am storing all the checked items values in arraylist using code below</p>

<pre><code> ArrayList  services= new ArrayList();
for (int i = 0; i &lt; chkservices.Items.Count; i++)
        {
            if (chkservices.Items[i].Selected == true)
            {
                services.Add(chkservices.Items[i].Text+',');
            }
        }
</code></pre>

<p>now the problem is when i insert data in to database instead of data in the arraylist it gets inserted as '<strong>System.Collections.ArrayList</strong>' how can  i insert all values into database in a single insert statement?</p>

<p><strong>EDIT</strong></p>

<p>inserting into database </p>

<pre><code>con.Open();
        SqlCommand cmd = new SqlCommand("insert into XXX(First_Name,Last_Name,ServicesProvided) values ('" + txtfrstname.Text + "','" + txtlastname.Text + "','" + services + "')", con);
        cmd.ExecuteNonQuery();
        con.Close();
</code></pre>

<p>or could anyone provide me a alternative for arraylist..i need to save checked items from checkboxlist and save it in database</p>

<pre><code>it should be saved in database as

  First_Name             Last_name                 ServicesProvided
user1firstname        user1lastname               selectedvalue1,
                                              selectedvalue2,selectedvalue3
</code></pre>
