Partager via


HttpPostAttribute.IsValidForRequest Method

Determines whether a request is a valid HTTP POST request.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

'Declaration
Public Overrides Function IsValidForRequest ( _
    controllerContext As ControllerContext, _
    methodInfo As MethodInfo _
) As Boolean
public override bool IsValidForRequest(
    ControllerContext controllerContext,
    MethodInfo methodInfo
)
public:
virtual bool IsValidForRequest(
    ControllerContext^ controllerContext, 
    MethodInfo^ methodInfo
) override

Parameters

  • controllerContext
    Type: System.Web.Mvc.ControllerContext
    The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data.

Return Value

Type: System.Boolean
true if the request is valid; otherwise, false.

See Also

Reference

HttpPostAttribute Class

System.Web.Mvc Namespace