Share via


ValidateInputAttribute 类

定义

表示一个特性,该特性用于标记必须验证其输入的操作方法。

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class ValidateInputAttribute : System.Web.Mvc.FilterAttribute, System.Web.Mvc.IAuthorizationFilter
type ValidateInputAttribute = class
    inherit FilterAttribute
    interface IAuthorizationFilter
Public Class ValidateInputAttribute
Inherits FilterAttribute
Implements IAuthorizationFilter
继承
ValidateInputAttribute
属性
实现

构造函数

ValidateInputAttribute(Boolean)

初始化 ValidateInputAttribute 类的新实例。

属性

AllowMultiple

获取或设置一个值,该值指示是否可指定筛选器特性的多个实例。

(继承自 FilterAttribute)
EnableValidation

获取或设置一个值,该值指示是否启用验证。

Order

获取或者设置执行操作筛选器的顺序。

(继承自 FilterAttribute)

方法

OnAuthorization(AuthorizationContext)

在需要授权时调用。

适用于