Hi guys,
In my application I have two Master pages and they are used in various different cases. Say one master view just renders the top half of the page and another master view that renders the top half plus a navigation bar to the side. We pass around data to these Master pages using view models
Now in my controller my index action refers to the MasterPage with the navigation bar and a details tab that does not need the navigation bar. But there is a problem now whenever I try to render the Details page my site crashes at the Site.MasterWithNavigation although it is noway involved with my details view. i have no clue how it lands up there.
On attaching the debugger and checking where the pae is crashing it showed me it is crashing at the Site.MasterWithNavigation and on checking the call stack there was just one entry which took me to my other Site.Master and showed the exception at a random partial view rendering line. I thought just for the heck of it let me comment out that piece of line and again saw the crash occurring now at a different line where I render an HTML input element.
Any idea why the hell I am seeing this? Note we have other pages that use the second master page but for some reason they are all in a different controller called WhateeverDetailsController. Do you think there is a problem when we use two different master pages across two different actions within the same controller.