Share via


ModelBinderAttribute 类

定义

表示一个特性,该特性用于将模型类型关联到模型生成器类型。

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Parameter | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)]
public sealed class ModelBinderAttribute : System.Web.Mvc.CustomModelBinderAttribute
type ModelBinderAttribute = class
    inherit CustomModelBinderAttribute
Public NotInheritable Class ModelBinderAttribute
Inherits CustomModelBinderAttribute
继承
ModelBinderAttribute
属性

构造函数

ModelBinderAttribute(Type)

初始化 ModelBinderAttribute 类的新实例。

属性

BinderType

获取或设置联编程序的类型。

方法

GetBinder()

检索模型联编程序的实例。

适用于