MvcOptions.SuppressBindingUndefinedValueToEnumType Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value indicating whether the model binding system will bind undefined values to
enum types. The default value of the property is false
.
public:
property bool SuppressBindingUndefinedValueToEnumType { bool get(); void set(bool value); };
public bool SuppressBindingUndefinedValueToEnumType { get; set; }
member this.SuppressBindingUndefinedValueToEnumType : bool with get, set
Public Property SuppressBindingUndefinedValueToEnumType As Boolean
Property Value
Remarks
This property is associated with a compatibility switch and can provide a different behavior depending on the configured compatibility version for the application. See CompatibilityVersion for guidance and examples of setting the application's compatibility version.
Configuring the desired value of the compatibility switch by calling this property's setter will take precedence over the value implied by the application's CompatibilityVersion.
If the application's compatibility version is set to Version_2_0 then this setting will have the value false
unless explicitly configured.
If the application's compatibility version is set to Version_2_1 or higher then this setting will have the value true
unless explicitly configured.