title: how to get MVC model binder to return empty string instead of null with razor editor template?
body: <p>I have an editor template called String that has the following html:</p>
  
  <pre><code>&lt;input type="text" name="@ViewData.ModelMetadata.PropertyName" 
      value="@(Model != null ? Model : string.empty)" style="width: 200px" /&gt;
  </code></pre>
  
  <p>For some reason, the properties of data type String on my view model are null when I post back if I leave the text boxes unfilled. The way i set up this editor template, shouldn't those values be empty strings instead? I'm curious why this doesn't work.</p>
  
  <p>I am thinking my only other alternative is to create my own custom model binder that will automatically convert all my null values to string.empty for data type "String".</p>
  
  <p>Any advice?</p>