protected void Page_Load(object sender, EventArgs e) { client = new ServiceReference1.Service1Client(); try { if (!Page.IsPostBack) { this.DropDownListPlayers.SelectedIndexChanged -= new System.EventHandler(DropDownListPlayers_SelectedIndexChanged); this.DropDownListGames.SelectedIndexChanged -= new System.EventHandler(DropDownListGames_SelectedIndexChanged); List <string> nList = client.getAllPlayersNames().ToList <string>(); DropDownListPlayers.DataSource = nList; DropDownListPlayers.DataBind(); List <string> gList = client.getAllGamesForCombo().ToList <string>(); DropDownListGames.DataSource = gList; DropDownListGames.DataBind(); this.DropDownListPlayers.SelectedIndexChanged += new System.EventHandler(DropDownListPlayers_SelectedIndexChanged); this.DropDownListGames.SelectedIndexChanged += new System.EventHandler(DropDownListGames_SelectedIndexChanged); } } catch (Exception ex) { Panel2.Visible = false; Response.Write(ex.ToString()); } }