The editor syntax parser conflict.
@ViewBag.IsTrue
is not a correct variable in javascript.
But execution is actually correct.
If you mind,may be using the code like following:
<script>
function check() {
var Not = false;
//Doing something...
if (Not) {
window["@ViewBag.IsTrue"] = false;
}
else{
window["@ViewBag.IsTrue"] = true;
}
</script>
to make it working well.
solved Razor parser isn’t parsing?