views:

148

answers:

1

I have a /Register [GET] Action in the controller that pre-poluates a view-model with a string and an integer and returns: return View(myModel);

I can see the string being populated in the textarea and the id being populated in a hidden input. Yet when the form gets POSTed, the string value is null and the int value is 0. I verified that both values are posted to the server but the model received in the POST action is missing those values. Any insight, anyone?

Thanks.

+1  A: 

I think it was late night coding that made me overlook my getters and setters on the view- model. I was missing a getter and a setter for both properties. Thanks guys. All solved now.

alexm