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)
Syntax
public virtual bool ConvertEmptyStringToNull { get; set; }
public:
property bool ConvertEmptyStringToNull {
virtual bool get();
virtual void set(bool value);
}
abstract ConvertEmptyStringToNull : bool with get, set
override ConvertEmptyStringToNull : bool with get, set
Public Overridable Property ConvertEmptyStringToNull As Boolean
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.
See Also
ModelMetadata Class
System.Web.Mvc Namespace
Return to top