public void GridBind() { try { DAL = new DataAccessLayer(); DataTable dtbl = DAL.GetAllUsers(); grdViewUsers.DataSource = dtbl; grdViewUsers.DataBind(); } catch (Exception ex) { lblUserErrorMessage.Visible = true; lblUserErrorMessage.Text = "Exception Occur in Binding: " + ex.Message; lblUserErrorMessage.ForeColor = System.Drawing.Color.Red; } }