I was thinking if it is possible to re-use the views.
I have few strongly typed view pages within the same controller, and the code in these views to display the are same. The only difference is the model is served via different action.
So, is there a way to have a single view which can be re-used by these actions.
Please note: I am aware of partial view/view usercontrols, but these still requires me to have and maintain separate files. Hence my question. If no other options, I will use these. My question is to find alternatives, so dont suggest the above.
The choice of the view does not necessarily have to be convention-based. You can very well specify the name of the view to be used like so:
And, of course, if you need to pass a model—and you probably do—simple pass a second parameter: