I have a view rendering a Model, where Model is changed and posted to an action.
Some properties of the Model are kept unchanged and just need to be passed on to the view.
Eg. Model has properties Color and Name:
**View:**
Model.Name - used for for something.
Model.Color - not used, just needs to be preserved and passed on to action.
[HttpPost]
**Action:**
String Name = Model.Name
String Color = Model.Color
Do I use a hidden field for that ?
Yes, but only if
Colorcan be different on different requests and you need thatvalueafter the post.Another way is to store it in the
Session.The safer way is to store it in the session, because even hidden fields can be manipulated
Hidden
Session