What is ViewBag?

ViewBag 101: How It Works, When It’s Used, Code Examples, and More

Stackify Developer Tips, Tricks & Resources

ViewBag is a property – considered a dynamic object – that enables you to share values dynamically between the controller and view within ASP.NET MVC applications. Let’s take a closer look at ViewBag, when it’s used, some limitations, and other possible options to consider. What is ViewBag? The Microsoft Developer Network writes that the ViewBag property allows you to share …