I wanted to ask, what would be the best mvc practice to get the following result:
I want to create a mvc website with one master page and several content pages.
There are some parts on the master page (besides the header and footer) on the left side, that should be available on every content page.
So I guess it makes sense to put that stuff inside the masterpage. These things are several panels. There is one panel with a search field and a search button. Another panel should retrieve data from an own viewmodel, that displays content related data to the user.... and there are another 2 similar panels.
So I thought I could create for those 4 "panels" 4 parial strongly typed views with their own ViewModels. Then implement them with RenderPartial on the Masterpage.
But I realized, that this causes a lot of problems in mvc. First I realized, that I am having problems that the viewmodels behind the partial views are different to the viewmodels of my content pages.
Then I realized that I have anyways problems with more than one submit button. I read now a lot of different solutions on similar cases and now I really dont know, what would be a very "pretty" solution for my case.
I think this is not something very rare that someone is having a searchbox with a search button shared for all pages, because I read
View Complete Post