private void loadRecords() { // call to fuction in common class. // this function get all the records from database and bind them to gridview. clsCommon objCom = new clsCommon(); grdRecords.DataSource = objCom.getErrorLogs(); grdRecords.DataBind(); }