1

I have a very simple Model with an ID(int) and 4 Non-Null String fields. They can be empty though. If I put [Required] on them it forces a Value to be entered. If I don't do anything and you leave it blank it throws an error as by default Blank==null.

How do I get it to default to String.Empty?

Refracted Paladin
  • 12,096
  • 33
  • 123
  • 233
  • 1
    look [here](http://stackoverflow.com/questions/3475273/how-to-convert-textboxes-with-null-values-to-empty-strings) or at the second answer [here](http://stackoverflow.com/questions/5383696/asp-net-mvc-converting-null-to-zero-length-string) – Jonesopolis Jan 20 '14 at 20:24

0 Answers0