.NET Framework Class Library
DefaultModelBinder.IsModelValid Method
Determines whether a data model is valid for the specified binding context.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Syntax
Visual Basic
Protected Shared Function IsModelValid ( _ bindingContext As ModelBindingContext _ ) As Boolean
C#
protected static bool IsModelValid( ModelBindingContext bindingContext )
Visual C++
protected: static bool IsModelValid( ModelBindingContext^ bindingContext )
Parameters
- bindingContext
- Type: System.Web.Mvc.ModelBindingContext
The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException |
The bindingContext parameter is null. |
See Also