What is syntax for Viewdata in MVC ?
Sandeep Kumar
******* Set Temp Data *********** public ActionResult Index() {ViewData["Name"] = "Monjurul Habib";return View(); } ******* Get Temp Data *********** @ViewData["Name"]
The syntax for Viewdata in MVC is Viewdata["variable"]=value;