Select from following answers:- No difference, both of them are same.
- We cannot use Sessions in MVC.
- TempData is restricted to a controller whereas Session is not.

- Sessions are restricted to a controller whereas TempData is not
- All Above
In MVC, there are no code behind file.
So, in order to use a particular data or value of a control we use sessions and TempData.
TempData is restricted only to single controller and so if we need the value in another controller we cannot access it whereas Session maintains the values throughout the application.
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator