I am moving a web forms project to MVC and one part of the app has a table that has all jobs in the database. it also has links to see all jobs within the thirty days and 60 days. wondering if i have to make a new view for each of the functionality or if a view can have more than one controller and how to do it?
Asked
Active
Viewed 31 times
0
-
view? You mean a table view or a view within the MVC model? – Raymond Nijland Jul 10 '18 at 18:29
-
please explain by what you mean by each of the functionality? From what you stated, you could create a partial view that can be shared for the grid. then any of the links would probably be a single controller action that gets passed the job id. – Fran Jul 10 '18 at 19:04
-
A view is not necessarily coupled to a controller. It all really depends on how your routing is set up as far as the default functionality, but you can even just specify a path for a view when returning it from as many controllers as you'd want. – CTDev Jul 10 '18 at 19:19