I think you mean saving the state of the ui widget between postbacks (rather than saving user settings).
Many of this state applies only to specific widgets for a specific user after a certain series of interactions (for example, expand this node tree, click on this grid line, etc.). This material does not need to go into the database or even into the session if you do not need to restore the state between page loads.
All these things that I incline towards an object or two, for example:
treeState.expandedNodeId = 'foo'; gridState.selectedRowIndex = 3;
Then I periodically save it in a hidden field:
$('.treeState').val(Sys.Serialization.JavaScriptSerializer.serialize(treeState));
and etc.
The value is sent back with the result of the postback, and I just deserialize and restore my widgets from the saved values. Annoying, but working well.
source share