In my web application I have a number of custom grids on a page. I want the user to be able to edit data in each grid and then press save once at the end of the process to commit their changes.
So I need somewhere temporary to persist their changes before they are comitted. The grids will use AJAX/Javascript so as to not force a full page refresh when data is edited
I can think of the following options for storing temporary data
- Hidden form fields
- ViewState
- Session
The option I'm least comfortable with is the ViewState option as I have read that this is being phased out in ASP.NET 4.0 and am not sure if you can access ViewState from an AJAX page method.
I'm interested in peoples opinions on the above options and also if ViewState should be used for storing data that is not related to out of the box controls.