Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have some queries regarding session and view state in MVC 4.0:
1. Can we use session and view state in MVC 4.0.
2. Is there any better alternative of session and view state.

Thanks & regards,
Ashish
Posted

1 solution

You can use session, but there is no view state in MVC.
There is a concept of ViewData and ViewBag that can be used to pass data across requests - What is ViewData, ViewBag and TempData?[^].
 
Share this answer
 
v2

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