We recently upgraded an existing .NET 4 MVC 3 project to .NET 4.5 and MVC 4.
If we had such things in view:
@Model.MyBool <input type="hidden" name="foo" value="@Model.MyBool" />
which is used to display as:
True <input type="hidden" name="foo" value="True" />
or
False <input type="hidden" name="foo" value="False" />
But now it displays as:
True <input type="hidden" name="foo" value="value" />
or
False <input type="hidden" name="foo" />
That is, when a logical property is displayed in the view as the attribute value of a hidden input value, it does not appear as True or False (as it happens elsewhere), but rather displays as value , or does not skip the attribute at all.
Two questions:
- WTF?
- Is there a good easy way I can fix a lot of places that have broken my application? This is a great application, and I do not like to trawl every point of view to try to determine wherever I put the bool in the input field.
source share