protected void AddArtists() { //get the fan's key int key = (int)Session["Fankey"]; //loop through the checkboxList //to see what's checked foreach (ListItem i in FanArtistCheckBoxList.Items) { //if it is checked call the service method to add //it to the database if (i.Selected) { int x = vsr.AddFanArtist(key, i.Text); } } errorLabel.Text = "Artist have been added"; FanArtistCheckBoxList.Items.Clear(); }