I\'m trying to do this simple thing
<%= Html.HiddenFor(model => model.Id)%>
the model is
[HiddenInput(DisplayValu
I ran into this problem as well with @Html.HiddenFor.
@Html.Hidden("Id", Model.Id) also gave value 0, but a foreign key field, e.g., @Html.Hidden("Model_Category_ModelId", Model.Category.ModelId) did work, while it @Html.HiddenFor(m => m.Category.ModelId) did not.
My solution was to redirect to the get action, as described in ASP NET MVC Post Redirect Get Pattern.