Share via


HttpGetAttribute 类

定义

表示一个特性,该特性用于限制操作方法,以便该方法仅处理 HTTP GET 请求。

[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public sealed class HttpGetAttribute : System.Web.Mvc.ActionMethodSelectorAttribute
type HttpGetAttribute = class
    inherit ActionMethodSelectorAttribute
Public NotInheritable Class HttpGetAttribute
Inherits ActionMethodSelectorAttribute
继承
属性

构造函数

HttpGetAttribute()

初始化 HttpGetAttribute 类的新实例。

方法

IsValidForRequest(ControllerContext, MethodInfo)

确定操作方法 GET 请求对指定的控制器上下文是否有效。

适用于