Dec 04, 2012, 5:19 PM
Generic alternative for @model in Razor view
Hi,
I'm studying the GridPanelFor example. It uses the @model keyword to define model type on which the grid should be built.
My controller is:
Thank you.
I'm studying the GridPanelFor example. It uses the @model keyword to define model type on which the grid should be built.
@model IEnumerable<Ext.Net.MVC.Examples.Areas.Models.GridEmployee>
I would like to pass that type from the controller, to be able to use a single view for multiple models.My controller is:
public ActionResult RenderWindow() {
Ext.Net.Examples.DataService ds = new Ext.Net.Examples.DataService();
return new Ext.Net.MVC.PartialViewResult { ViewName = "Window"};
}
Any ideas on how to do it?Thank you.
Last edited by millenovanta; Dec 09, 2012 at 6:44 PM.