I have a problem with my data binding from View to Controller
I have an object that includes 3 other objects that I want to pass from controller to view
ModelView { Product, PagingInfo, Filter }
So this is how it looks like from controller
public ViewResult List(ModelView mv, int page = 1) {
var viewModel = new ModelView() { ... }
return View(viewModel);
and the View looks like this
Inherit = "viewModel"
using(html.BeginForm()) { Html.EditorFor(x => x.Filter.Name) ... }
Questions are:
Am i right for binding ModelView as a parameter in the controller? or should I bind Filter instead?
When I used a debugger, it seemed like whatever I put in textfield (Html.editorfor) doesn't get binded back the controller
Please Help
Thanks