0

I have some really complex ASP .NET MVC 3 page where I need to create multilevel hierarchy data.

(This data also includes download file names.)

Is there any best way to keep temp data for multiple AJAX requests in ASP .NET MVC 3 within 1 page?

Thank you!!!

NoWar
  • 36,338
  • 80
  • 323
  • 498

2 Answers2

3

Here are a couple of options:

1- use Session storage

2- Use TempData.Peek instead. This method reads the data but does not mark it for deletion

epignosisx
  • 6,152
  • 2
  • 30
  • 31
0

Without more details you're looking at

1) MVC Session Object - a solid solution, but keep an eye object size

2) A hidden control (e.g. textbox/textarea) - easy to implement but may not be practical depending on the structure/type of data you're dealing with

3) JQuery Cache - easy and all client side

digitalmarks
  • 419
  • 3
  • 3
  • Ty! Also I found this opinion http://stackoverflow.com/questions/5181695/mvc3-multi-step-form-how-to-persist-model-object – NoWar Jan 06 '12 at 10:52