I have a view that allows users to edit some properties, there are many properties I can see from I do not want to be, however, I can not just put everything in the hidden areas for postback.
I'm sure that this is a normal scenario, is it an easy way to post changes only from the scene, such that the properties stored in the database are not overwritten with zero or default values ?
I know that I can store the model in session session, the edit scene is called and then the changes are checked when the form is posted back, but it seems that Like the hack? Instead of looking at your domain model object, use a different visual model in which only the properties that you want the user to display. Are there. When the visual model is posted back, retrieve the domain model and update its property with the visual model.
No comments:
Post a Comment