I use Html helpers to display model data in form fields, e.g. Html.TextBoxFor, Html.TextAreaFor.
When the model values are null, I would expect the values should be empty in the form fields. They are displayed normally in Safari and Firefox, i.e. empty, but in IE, they are shown as "null" in a text field (see image below).
<img src="https://i.stack.imgur.com/Yxiyl.png" alt="enter image description here">
Any clue how to fix this? Thanks.
value == null, IE would display
null in the textbox (or textarea).
The quick fix is simply display an empty string instead...
$('#someTextBox').val(value == null ? '' : value);