Using asp.net MVC3, I have a partial view which requires remote validation. As I understand it this means it needs it's own controller, so I'm using Html.Action to call this view and it's controller.
I do however wish to still pass a model to Html.Action, just like I would with Html.Partial. How can I do this?
Html.Action has an overload that expects route values as an object. you could trying passing the model there and model binding will kick in. Your action has to be expecting a parameter of type Model though.
Html.Action("ActionName","ControllerName", Model)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With