In a recent project - i've hit an unexpected snag.
A class with simple public fields (note not properties) doesn't seem to want to play nice with the
ASP.net MVC 3.0 model binder.
Is this by design?
besides changing the fields to properties - any options here?
update
The reason for the simple fields (instead of properties) is because I'm working with a shared library between MVC and a Script Sharp project. Script sharp supports properties - but it becomes a mess with javascript in the view (using knockout.js)
So despite what i'd love (which is to just use properties) i'm using public fields in my dto classes.
I wanted to avoid having multiple definitions of the same classes. sigh
See Question&Answers more detail:os