private void LoadGrid() { try { BLItem objBL = new BLItem(); // declare and initialize BLItem object teacher_course_info.DataSource = objBL.Get_Employee_Current_Courses(Session["New"].ToString()); //setting data source for the gridview teacher_course_info.DataBind(); //bind the data source to the gridview } catch (SqlException) { throw; } }