The attribute, DisplayFormatAttribute.ConvertEmptyStringToNull has a default of true. I would like to default it to false for the entire site (or by class or page would be good too). Is there a way I can do this so I don’t need to decorate each test form field with:
[DisplayFormat(ConvertEmptyStringToNull=false)]
You can create your own custom model metadata provider like this:
Then register it in your app_start: