private void showWgrade() { Rblgrade.Items.Clear(); string yearselect = Rblyear.SelectedValue; if (!string.IsNullOrEmpty(yearselect)) { LearnSite.BLL.Works wbll = new LearnSite.BLL.Works(); Rblgrade.DataSource = wbll.ShowWgrades(Int32.Parse(yearselect)); Rblgrade.DataTextField = "Wgrade"; Rblgrade.DataValueField = "Wgrade"; Rblgrade.DataBind(); if (Rblgrade.Items.Count > 0) { Rblgrade.SelectedIndex = 0; } } }