HttpPostAttribute Class

Summary

Identifies an action that only supports the HTTP POST method.

Syntax

public class HttpPostAttribute : HttpMethodAttribute, _Attribute, IActionHttpMethodProvider, IRouteTemplateProvider

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.HttpPostAttribute

Constructors

Microsoft.AspNet.Mvc.HttpPostAttribute.HttpPostAttribute()

Creates a new [Microsoft.AspNet.Mvc.HttpPostAttribute](Microsoft.AspNet.Mvc.HttpPostAttribute.yml).

public HttpPostAttribute()
HttpPostAttribute(System.String)

Creates a new [Microsoft.AspNet.Mvc.HttpPostAttribute](Microsoft.AspNet.Mvc.HttpPostAttribute.yml) with the given route template.

Arguments:
  • template (System.String) – The route template. May not be null.
public HttpPostAttribute(string template)