private void btnsearch_Click(object sender, EventArgs e) { string txtstuid = textBox1.Text; StudentInfoBLL stubll = new StudentInfoBLL(); List <StudentInfoModel> list = stubll.getStudentInfoID(txtstuid); this.dgvStudent.DataSource = list; }