private void FillMatchType() { clsMatchType e = new clsMatchType(); clsMatchTypeController ec = new clsMatchTypeController(); DataTable dt = new DataTable(); dt = ec.GetAllMatchType(); if (dt.Rows.Count > 0) { ddlMatchType.DataSource = dt; ddlMatchType.DataTextField = "MatchTypeName"; ddlMatchType.DataValueField = "MatchTypeId"; ddlMatchType.DataBind(); ddlMatchType.Items.Insert(0, new ListItem("-- Select --", "0")); } }