32
rated 0 times
[
39]
[
7]
/ answers: 1 / hits: 98662
/ 12 Years ago, mon, january 21, 2013, 12:00:00
How do I render a Boolean to a JavaScript variable in a cshtml file?
Presently this shows a syntax error:
<script type=text/javascript >
var myViewModel = {
isFollowing: @Model.IsFollowing // This is a C# bool
};
</script>
More From » asp.net-mvc