protected void DeleteGame_Click(object sender, EventArgs e) { try { string gameId = ((DropDownListGames.SelectedItem).ToString().Split(' '))[0].ToString(); client.DeleteGame(gameId); List <string> gList = client.getAllGamesForCombo().ToList <string>(); DropDownListGames.DataSource = gList; DropDownListGames.DataBind(); GridView1.DataSource = null; GridView1.DataBind(); } catch (Exception ex) { Panel2.Visible = false; Response.Write(ex.ToString()); } }