I have method in my N-layered application that returns List<Employee>
.
Below is the sample code for the method:
public List<Employee> GetAllemployees()
{
return DAL.GetEmployees();
}
I have a GridView in my aspx page. How do I set the GridView's datasource as GetEmployees()
so that all the employees are listed in the GridView?