003 - .Net Core: Send data 'from CONTROLLER to VIEW' by using ViewBag in 2 minutes.

preview_player
Показать описание
This video presents a simple ViewBag usage as one of the answers to the question: How to send data from controller to view in "ASP.NET CORE Web Application ?

Assigning Value In Controller:
ViewBag.MyVariable = "a sample string";

Displaying in Razor View:
@ViewBag.MyVariable

Software:
OS: Windows 10
IDE: Visual Studio Community Edition
Browser: Firefox
.NET Core v2.2

Credits of the music:
Afternoon (Ambient Piano Solo) which is licensed under the Creative Commons 0 License.
Рекомендации по теме