is it possible to pass derived types where base types are expected to strongly typed views?
I.e
- Products/List
- News/List
where "list" view Inherits System.Web.Mvc.ViewPage<Model<BaseList>>
controller renders view i.e View("List", ProductsList)
edited
return View("List", new Model<ProductsList>());
Model<T> where T : IMyList
ProductsList : BaseList
NewsList : BaseList
BaseList : IMyList
where ProductsList & NewsList : BaseList
compiles fine but get a runtime error about differing model types.
If this not possible what is the best way to accomplish this rather than creating n no of views ?