I have my first development ASP MVC site and now need to extend it. I have defined a number of Controllers to satisfy the following :
~/Helpers
~/Templates
~/Profiles
What I need now is for the URL to have a parameter in it. So,
~/Helpers/PN
~/Helpers/AD
~/Helpers/TEL
All need to use the same view, passing a parameter of “PN”,”AD” or “TEL”.
How do I do this?
You can create a viewmodel that wraps the individual models and create a partialview that is typed to that viewmodel. Then your individual views can render that partial view.