Introduction This article demonstrates an interesting and very useful concept in ASP.NET MVC. Question: What is ViewData? In simple terms "ViewBag is a data holder that enables definition of a key-value pair and that holds the data that can be passed from controller to view". Step 1: Create a new ASP.NET MVC application Step 2: Adding New Model
Step 5: The output for the application looks as in the following