I have the following page structure in asp.net mvc 4.
Department Full Time Employees Part Time Employees
----------- ---------------------------------------------
Department 1 |1. Employee 1
Department 2 |2. Employee 2
|
Where Department 1, Department 2, Full Time Employees and Part Time Employees are links. Clicking on any link results in displaying some employees. Here are the possible options
- When the user browse the page for the first time, full time employees in first department (Department 1) are displayed.
- When the user clicks Department 2, full time employees from department 2 are displayed (since the full time link is already selected by default)
- When the user clicks Part Time, part time employees are displayed for the selected department.
I don't know how to construct the action links for these different links. The target result that I am aiming at is something like
- www.example.com/Department1/fulltime
- www.example.com/Department1/parttime
- www.example.com/Department2/fulltime
www.example.com/Department2/parttime
Thanks
Update
The issue here is how to construct the action link not how to route them to the controller. Currently I do have an action is my Home Controller which accepts the Department and full time/part time. What I am not able to figure out is how to keep track of things. For example If user click the Part Time link while Department 2 is already selected, how can the link for Part Time convey the selected Department to the action method so that the controller knows it has to display part time employees from selected department. Similarly with Part Time selected, if user clicks Department, how does the link for department convey the information to controller that it has to display part time employees in the clicked department.