I am trying to receive bool values from ViewBag.
But the issue is that to receive value I am using:
var test = '@ViewBag.Test'
In this way value will be 'True'
or 'False'
(string). Of cource I can use something like if (test == 'True')
but, is there a way to get from ViewBag bool value dirrectly, or at least convert it?
EDIT:
I need to get ViewBag value in javascript part.
var test = '@ViewBag.Test';
tovar test = @ViewBag.Test;
? – Mapping