SqlConnection sqlconn = new SqlConnection("server=.\\sqlexpress;database=forum;integrated security=true");
SqlCommand sqlcomm = new SqlCommand("select country from countryname ", sqlconn);
sqlconn.Open();
SqlDataReader dr = sqlcomm.ExecuteReader();
if (dr.Read())
{
string Country = dr["Country"].ToString();
var toArray = Country.Split(',');
foreach (var s in toArray)
{
CheckBoxList1.Items.Add(s);
}
dr.Close();
sqlconn.Close();
}
I have Updated My Answer this is working i have Checked :) i saw that solution given below and applied according to ur requirement.