protected void GetUserList() { UserBLL user = new UserBLL(); try { DataTable dt = user.GetActiveUserList(); userListGridView.DataSource = dt; userListGridView.DataBind(); if (dt.Rows.Count < 1) { msgbox.Attributes.Add("Class", "alert alert-warning"); msgbox.Visible = true; msgTitleLabel.Text = "Data Not Found!!!"; msgDetailLabel.Text = ""; } GridviewHeadStyle(); } catch (Exception ex) { msgbox.Attributes.Add("Class", "alert alert-warning"); msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message; } finally { user = null; } }