Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have experience in mvc 3.5 but still i have confusion
suppose,
C#
[HttpGet]
       public ActionResult Index()
       {
           Employee employee = new Employee();

           return View(employee);
       }


we have method Index, it passes class employee which has static constructor we are initiating values of object employee

but same data i can able to fetch from
@Model properties or
@model Employee or
@ViewData.Model

same cannot be get by ViewBag

so is it like when we pass data Action to View it store data in ViewData memory somewhere,how this happening internally want to know.
can we fetch from ViewBag

What I have tried:

Question relative mvc data flowing
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900