Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ModelMetadata.ConvertEmptyStringToNull Property

 

Gets or sets a value that indicates whether empty strings that are posted back in forms should be converted to null.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public virtual bool ConvertEmptyStringToNull { get; set; }

Property Value

Type: System.Boolean

true if empty strings that are posted back in forms should be converted to null; otherwise, false. The default value is true.

Return to top
Show:
© 2015 Microsoft