Asp.net mvc / jQuery / JavaScript
In my partial view, I have a model that has boolean properties that I will pass to JavaScript functions.
I pass the model boolean properties to JavaScript functions as such.
- @model GbngWebClient.Models.LikeOrDislikeVM
- @* Use the values that were passed via a model. *@
- class="row">
class="blogLike my-size fa fa-thumbs-up">class="my-size"> : @Model.LikeCount class="my-size"> | class="blogDisLike my-size fa fa-thumbs-down">class="my-size"> : @Model.DisLikeCount
- @Scripts.Render("~/bundles/jquery")
The code executes but the boolean values are False instead of false. Yet the model screenshot above shows them as false.
JavaScript needs them to be false. Why is this happening and how to fix?

First LastRank #2,033 · 713 reputationPosted Aug 20, 2020, 8:27 AM EDT
Jenith ThakkarRank #789 · 2.9K reputationPosted Aug 19, 2020, 8:03 PM EDT
Laxmidhar SahooRank #383 · 6.6K reputationPosted Aug 20, 2020, 10:15 AM EDT