I am migrating a Webforms site to MVC. In my webforms site I have pages that utilise various combinations of User Controls, then chunks of html then Labels, Textboxes etc.
I don't want to hardwire each page so I am going to drive the output for each page from a CMS which specifies the order to insert the controls into the page.
I imagine each control will now be a Partial View in MVC. (Let me know if that's not correct).
So if I have two different partial views, ViewA and ViewB, how do I create a controller method that inserts the partial views into the view that is returned in the order determined by the CMS for a given url?
So assuming the controller method is called Reports and it takes a parameter called product.
eg //MySite/Reports?product=A returns a view containing ViewA, ViewA, ViewB, ViewA
whereas
//MySite/Reports?product=B returns a view containing ViewA, ViewB, ViewA, ViewB etc
So what should the code be for the controller method?
I hope that makes sense