public static List <Users> GetData() { DDL dbCall = new DDL(); List <Users> lstUsers = dbCall.GetUsers(); return(lstUsers); }
protected void Page_Load(object sender, EventArgs e) { if (Session["User"] == null) { Response.Redirect("~/LoginInfo.aspx"); } DDL dl = new DDL(); List <Users> lstUser = dl.GetUsers(); rvDisplayUser.DataSource = lstUser; rvDisplayUser.DataBind(); }