protected void drpbranch_SelectedIndexChanged(object sender, EventArgs e) { List <Student> _StudentList = new List <Student>(); _StudentBL = new StudentBL(); _StudentList = _StudentBL.BL_Student_Select_BY_Branch(drpbranch.SelectedItem.Text); drpstudent.DataSource = _StudentList; drpstudent.DataTextField = "STUDENTNAME"; drpstudent.DataValueField = "SID"; drpstudent.DataBind(); drpstudent.Items.Insert(0, "SELECT"); }
protected void Button11_Click(object sender, EventArgs e) { if (drpbranch.SelectedIndex == 0) { lblmsg.Text = "Select Branch !!"; MultiView1.ActiveViewIndex = -1; } else { List <Student> _StudentList = new List <Student>(); _StudentBL = new StudentBL(); _StudentList = _StudentBL.BL_Student_Select_BY_Branch(drpbranch.SelectedItem.Text); GridView1.DataSource = _StudentList; GridView1.DataBind(); MultiView1.ActiveViewIndex = 0; lbl.Text = GridView1.Rows.Count.ToString() + " Student Found."; } }