private void showWclass() { Rblclass.Items.Clear(); string gradeselect = Rblgrade.SelectedValue; if (!string.IsNullOrEmpty(gradeselect)) { string yearselect = Rblyear.SelectedValue; LearnSite.BLL.Works wbll = new LearnSite.BLL.Works(); Rblclass.DataSource = wbll.ShowWclass(Int32.Parse(yearselect), Int32.Parse(gradeselect)); Rblclass.DataTextField = "Wclass"; Rblclass.DataValueField = "Wclass"; Rblclass.DataBind(); if (Rblclass.Items.Count > 0) { Rblclass.SelectedIndex = 0; } } }