I am working on MVC application and I need to check ViewBag
value on cshtml page, how can I do that?
on Controller.cs:
Viewbag.Mode= "EDIT";
I need to check the value from Viewbag.Mode
if it is EDIT
show alert as EDIT
I am writing this conditional code in JavaScript, what is the syntax to check Viewbag property in cshtml?