Multi page forms on ASP.NET MVC
I have decided to use ASP.NET MVC to develop multi page (registration) forms in asp.net. There will be two buttons on each page that allows the user to navigate to the previous and next page. When the user navigates back to a page they recently filled out, the data should be displayed to them. I understand ASP.NET MVC should remain stateless but how should I maintain page information when the user navigates back and forth.
Should I?
- Save the information to a database and retrieve information for each page change?
- save information to the session?
- Load all the fields and display only wh开发者_Python百科ats's needed with javascript?
This registration form is going to be used in multiple sites but with different sets of questions (Some may be the same). IF performance is a main concern, should I avoid generating these forms dynamically?
Jay
This sounds like the kind of information that you would want to store in a user session. What session store is used can be configured, so you could use a database to store session for users if that would be a better fit than using in-process session.
精彩评论