Is there a way to render a complete model as hidden fields?
Something like:
@Html.HiddenFor(m => m)
Or do I have to render every single property of my model with HiddenFor?
Edit:
It is a complex wizard (5-10 steps). In the last step I want to store the data in the DB. Perhaps I can serialize the model as JSON to a hidden field. Then I could also access it via JS.
if(!ModelState.IsValid) return View(model). If you haven't persisted those 5 display-only properties via hidden fields or some other mechanism, the returned view can't display them (without fetching them all from the DB again).