开发者

Navigate Page to Page in Web Application Keeping user inputs

Is it possible in an ASP.NET application to keep what the user has entered from one page to another, similar to a Windows Application? so when the us开发者_开发知识库er navigates back to the main page, all the info entered still remains.


I can think of a couple of options (there are probably more):

  1. Cookies.
  2. Individual Session objects for the data you want to persist
  3. Single Dictionary object stored in session that holds the question/answer pairs.
  4. Round trip to the database each time and retrieve/store the answers based on some key.

I would personally choose option 3 (combined with saving to the DB when appropriate). The dictionary object is easy to work with and you limit the amount of useless crap floating around in Session and cluttering things up.

It really depends on your specific application, though. Some more details would be helpful.


I think sessions are ideal here...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜