I am using paging on a GridView that is tied to a List<Employee>. But this code does not work. What is the correct way? I am not using an ObjectDataSource.
protected void myGV_PageIndexChanging(object sender, GridViewPageEventArgs e) { List<Employee> p = ReturnEmplColl(); GridView1.DataSource = p.Paging(1, e.NewPageIndex); GridView1.DataBind(); }
Try this: