******* Set Temp Data *********** public ActionResult Index() {ViewBag.Name = "ABC";return View(); }******* Get Temp Data *********** @ViewBag.Name
The syntax for Viewbag in MVC is Viewbag.variable=value;