I have a ViewBag.IsLocal set to true in controller. I would like to use jquery to check the ViewBag value and display an alert.
Code:
if(@ViewBag.IsL
You can use the following function
function parseBoolean(str) { return /^true$/i.test(str); }
and Use it as
if(parseBoolean('@ViewBag.IsLocal') == true) { alert("yeah"); }