I have a Model that has several properties. When I submit a form, I pass along the values for those properties (generated by the jQuery $.serialize()
method) and they are automatically bound. This works without a problem. However, now I want to add an Id
to the string, and I have to do it manually since it's not a form field. I've done so by appending '&Id=' + myId
to the end of the URL being posted. The result is a fine query string (I've checked what's getting sent in Firebug and a valid ID is getting posted)
My Model has a property Id
:
public Int32 Id { get; set; }
One would think that the Id would get bound automatically in the controller, but even though all the other data is, the Id is not. This is really frustrating. What could I possibly be doing wrong?