In ASP.NET MVC there are generic master views (ViewMaserPage<T>
). But what is the purpose of them? As I see it, generic argument of master view and "slave" view must be equal and this constraints me to using the same model for all my views.
views:
48answers:
2
+1
A:
You can probably use a base type for your model as the generic argument for your master page.
erikkallen
2010-04-03 09:13:42
+1
A:
You have abstract BaseViewModel which contain for example properties Title, Description, Keywords, ..., and all other view model classes inherits from BaseViewModel.
Hrvoje
2010-04-03 09:17:12
makes sense, thank you
amartynov
2010-04-03 09:41:16