Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

We are developing web application based on ASP.net with MVC3. Our requirement is to compose/present a page dynamically based on a configuration saved by Administrator. We need to load multiple components (in our case partial views) dynamically for a module/screen. as per configuration (Deployment for a customer). The configuration file will look like.
HTML
Client Id           Configured Component
Client1             SelectionCriteria	SelectionCriteriaVer1Component
                         PlanningSection	PlanningSectionVer2Component
                         AnalysisSection	AnalysisSectionVer3Component

Client2	          SelectionCriteria	SelectionCriteriaVer2Component
                         PlanningSection	PlanningSectionVer1Component
                         AnalysisSection	AnalysisSectionVer1Component


Now when client1 is logged then for PlanningModule, respected views will be rendered to construct a page.

We are using partial views for each component and render logic is written in controller. We are using StructuredMap to achieve this for dependency injection. Please suggest better the approach if we are in wrong direction.

All comments are welcome.
Posted
Updated 8-Apr-12 23:56pm
v2
Comments
Nelek 9-Apr-12 5:56am    
Tags added

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900