I am new to c# so please excuse the dumb question. I am creating a webapp using asp.net mvc. on the nav bar I have a button that brings up a modal containing a form. Now this is all done in the _Layouts.cshtml shared view. To capture the form post I use a ViewsModel which then passes it to the controller for processing. The problem is now that this loads that model into every view that is loaded in the webapp unless I use a separate shared view. Now this stops me from passing a model from the controller back to the view.
At the moment I have created a model named MasterViewModel which has the other view models as properties, but this still stops me from passing models to view...
Does anyone have any advise on how to get around this problem?