Given the following viewmodel:
public class FooViewModel
{
public bool IsBoolValue { get; set; }
}
and this view:
<input type="hidden" id="Whatever" data-something="@Model.IsBoolValue" value="@Model.IsBoolValue" />
The output of the hidden input field is this:
<input type="hidden" id="Whatever" data-something="True" value="value">
How come the value
attribute is not set toTrue
, but the data-something
attribute is?
Is there a change in MVC 5 that would cause this, since in my MVC 4 apps this problem does not occur.