asp.net-mvcmodelbinder

ASP.Net MVC DefaultModelBinder not binding properties on POST


I'm facing a really strange problem that has me smoked.

I have a fairly simple scenario where I have a strongly typed view that is correctly populated from the controller on the GET, but then when it POSTS the form to the controller, the Reqeust is full of all the right values and right key names for the default model binder to correctly populate one of my model objects, and the DMB creates the correct opject, but it never populates any of the properties, they're all in their default state.

This was working before, the only changes I can think of were that I tried a custom modelbinder (then removed it; double checked to make sure I'm not still using that), and I refactored the model to have a base class with some of the props.

Any thoughts?


Solution

  • Got it. The model had been refactored in a way which naturally affected the ability of the mdoel binder to populate it.