View Source
Class ContentModelBinder
Maps view models, supporting mapping to and from any IPublishedContent or IContentModel.
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
public class ContentModelBinder : DefaultModelBinder
Fields
View Source
Instance
Declaration
public static ContentModelBinder Instance
Field Value
Methods
View Source
BindModel(ControllerContext, ModelBindingContext)
Binds the model to a value by using the specified controller context and binding context.
Declaration
public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
Parameters
Type |
Name |
Description |
ControllerContext |
controllerContext |
The controller context.
|
ModelBindingContext |
bindingContext |
The binding context.
|
Returns
Type |
Description |
System.Object |
The bound value.
|
View Source
BindModel(Object, Type)
Declaration
public static object BindModel(object source, Type modelType)
Parameters
Type |
Name |
Description |
System.Object |
source |
|
System.Type |
modelType |
|
Returns
Type |
Description |
System.Object |
|
View Source
GetBinder(Type)
Declaration
public IModelBinder GetBinder(Type modelType)
Parameters
Type |
Name |
Description |
System.Type |
modelType |
|
Returns
Type |
Description |
IModelBinder |
|
Events
View Source
ModelBindingException
Occurs on model binding exceptions.
Declaration
public static event EventHandler<ContentModelBinder.ModelBindingArgs> ModelBindingException
Event Type