ViewData ,ViewBag and TempData
When passing information from an action method to a view, you basically have three options:
1. Use the ViewDatadictionary
2. Use ViewBag(starting in MVC 3)
3. Use a strongly typed view with a view model object
When passing information from an action method to a view, you basically have three options:
1. Use the ViewDatadictionary
2. Use ViewBag(starting in MVC 3)
3. Use a strongly typed view with a view model object