Here Mudassar Ahmed Khan has explained with an example, how to read (get) value of ViewBag using JavaScript in ASP.Net MVC Razor.
The value of the ViewBag will be read using Razor Syntax in JavaScript and the value will be displayed in JavaScript Alert Message Box.
↧