I wanted to do this because i wanted to have a master page bound to a strongly typed model, so that it can contain all of the Model Data that i will need for each page. But then I also need each viewpage to be strongly typed to a different model.
Is this doable?
One thought that I had was to have One data model for everthing which would then be inherited by another model for a specific controller, and then i would only need each page to be bound to the abstract model. But is that a best practice?
Thank you.
By child view, are you talking a partial view, or using Html.Action, or something else? If you use HTML.Action, you pass it routing parameters, and it loads whatever model it wants, but does not then inherit it from the parent. But a partial view receives a model from the parent view… so you can use whatever model you want if you explicitly pass a specific model…