I have an ASP.NET MVC 2 project that renders conventional strongly typed pages, but on some of these pages I also want to use the page's object to render a specific area (div) in the navigation section of the Master Page.
For example, if I have a Client object and associated strongly typed View, I want the View to be able to insert client-specific navigation items within a div in the Master Page's navigation.
I've actually achieved this in a not very elegant fashion by creating a ViewData item to hold the Client object - this is in addition to returning the client object with the View. The Master Page then takes the ViewData object and, if it's not null, renders the client-specific navigation section. This way of doing things will get very ugly as the number of different objects that have to be handled increases.
What I am looking for is a method to update a placeholder (ie an empty div) in the Master Page navigation during the page rendering process. Any C#, VB.NET or jQuery solution welcome.