I\'m using MVC3 razor, and I\'m trying to pass an object to a partial view, and it\'s not working.
This works fine without sending the object model to the partial vi
say you want to pass foo as model, make it first
public class Foo {
public string Name { get; set; }
public int Age { get; set; }
}
now make an ActionResult
public ActionResult FooBar(Foo _foo){
return PartialView(_foo);
}
call it
@Html.RenderAction("FooBar", "Controller", new { Name = "John", Age=20 });