I would like to set a JavaScript variable in my view (inside a script block) based on the existence of the ViewBag property from the controller ... for example:
var doAboutTab = @(ViewBag.DoAboutTab != null)
This generates a JavaScript error:
var doAboutTab = False
'False not defined'
Pablo source share