true instead of True (C#)
As a boolean (bool
), the values will always be "True" or "False". If you want to represent these differently when converted to a string, you can do the following in your view:
@Model.IsAdded.ToString().ToLower()
This will not work as IsAdded is boolean and "true" is string
IsAdded = (sessionStore.CheckExistanceOnSummary(product.productId) ?
"true" :
"false")
Try using it in javascript by converting it toLowercase().