Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi Everybody,

In my MVC Application i am getting List of products from the service. and Now i want to store that response to in State Variables (Temp Data or Session or other else ).

I know that temp data have some limitation temp data stores only records for one time reading. but we can use TempData.Keep() for store long time.

TempData["Products"] = serviceobj.GetAllProducts();    // 7000 products in one time.




So Please suggest me any good idea about it. Is Client side storage is good option for that...
Posted
Updated 23-Jul-13 6:22am
v2
Comments
RomilGandhi 25-Jul-13 5:55am    
use @ViewBag to store list of Products. You can also use TempData but ViewBag is better option to store records.
Anubhava Dimri 25-Jul-13 6:11am    
View data is only for passing the value from the controller to view and visa varsa.

I need to store data for long time. in which have i need to apply filtering shorting etc-etc.

so i can't use view data or view bag.
RomilGandhi 25-Jul-13 6:15am    
than it's better that you use session for that.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900