I'm planing to build a multi-step form with asp.net mvc 2. So, my web application will have 5 pages correspond to 5 steps. Each step has two submit buttons, previous and next. Input data for each step will be stored for reviewing later. For example, we already inputted data for step s 1,2,3,4 and we are in step 5 now. When I click on "previous" 2 times, step 3 should be displayed with data I inputted before. Similar, when I click "next", inputted data should also be retained in step 4 (since we are in step 3 now) Model used for each step can be very different.
I'm seeking a solution to save data for each step. I'm thinking about session and tempdata, both of them have disadvantages which I have to consider to use
Session
- Default session is cookie session, so session will not work well if web browser doesn't have cookie enabled. I also have a concern here, when IE doesn't have cookie anabled, session variable will be lost only in the case actor uses hostname to access web application. Session works fine in IE with ip address url.
- Cookies less session: not safe, have many constrains and have an issue with post (http://stackoverflow.com/questions/3972433/mvc2-cookieless-session-issue-using-post or http://forums.asp.net/p/1517391/3634908.aspx)
- Tempdata: tempdata just persists for one request.
I really appreciate your advice!
Thank you much!