What is ViewData? How to use ViewData in Asp.Net MVC?

preview_player
Показать описание
ViewData in ASP.NET MVC is used to transfer data from the controller to the view but not  vice-versa.
Its is similar to ViewBag, but ViewBag is dynamic type, whereas ViewData is a Dictionary.
To use it, Just need @ViewData[“Item”]

How to transfer data from Controller to View?

.Net Interview question and answers.
Рекомендации по теме
join shbcf.ru