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?
Laxmidhar SahooPosted Aug 20, 2020, 2:15 PM
First LastPosted Aug 20, 2020, 12:27 PM
Jenith ThakkarPosted Aug 20, 2020, 12:03 AM