I want to create an MVC app to generate factsheets, but I'm not sure how to structure the routing and controllers.
It consists of an index page, which acts as a template for the layout of a number of independent panels, each of which contains different types of data.
I want to have a the route template like the following:
/Factsheets/Panels/PanelType?fundId=1&countryId=ABC
so these would be the URLs I'm using:
/Factsheets/Panels/NameAndDatePanel?Afund=1&county=IE
/Factsheets/Panels/AssetsPanel?fund=1&county=IE
I want a Factsheets controller to be able to supply the Panel controller with the configuration object it needs to generate the type of panel I request.
What should my routing structure look like?
What should my controller structure look like?
edit:
What changes if I want to have a roure structure as follows:
I want to have a the route template like the following:
/Factsheets/ContentArea/Panels/PanelType?fundId=1&countryId=ABC
so these would be the URLs I'm using:
/Factsheets/PageTop/Panels/NameAndDatePanel?Afund=1&county=IE
/Factsheets/PageTop/Panels/AssetsPanel?fund=1&county=IE
so that FactsheetsController is instantiated to contain the data needed by a ContentArea to know which data to supply to the panel it needs to generate.