HtmlHelper.HttpMethodOverride Method
Returns a hidden input element that identifies the override method for the HTTP data-transfer method that was used by the client.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Overload List
Name | Description | |
---|---|---|
HttpMethodOverride(HttpVerbs) | Returns a hidden input element that identifies the override method for the specified verb that represents the HTTP data-transfer method used by the client. |
|
HttpMethodOverride(String) | Returns a hidden input element that identifies the override method for the specified HTTP data-transfer method that was used by the client. |
See Also
HtmlHelper Class
System.Web.Mvc Namespace
Return to top
HtmlHelper.HttpMethodOverride Method (HttpVerbs)
Returns a hidden input element that identifies the override method for the specified verb that represents the HTTP data-transfer method used by the client.
Syntax
public MvcHtmlString HttpMethodOverride(
HttpVerbs httpVerb
)
public:
MvcHtmlString^ HttpMethodOverride(
HttpVerbs httpVerb
)
member HttpMethodOverride :
httpVerb:HttpVerbs -> MvcHtmlString
Public Function HttpMethodOverride (
httpVerb As HttpVerbs
) As MvcHtmlString
Parameters
httpVerb
Type: System.Web.Mvc.HttpVerbsThe verb that represents the HTTP data-transfer method used by the client.
Return Value
Type: System.Web.Mvc.MvcHtmlString
The override method that uses the verb that represents the HTTP data-transfer method used by the client.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The httpVerb parameter is not "PUT", "DELETE", or "HEAD". |
Return to top
HtmlHelper.HttpMethodOverride Method (String)
Returns a hidden input element that identifies the override method for the specified HTTP data-transfer method that was used by the client.
Syntax
public MvcHtmlString HttpMethodOverride(
string httpMethod
)
public:
MvcHtmlString^ HttpMethodOverride(
String^ httpMethod
)
member HttpMethodOverride :
httpMethod:string -> MvcHtmlString
Public Function HttpMethodOverride (
httpMethod As String
) As MvcHtmlString
Parameters
httpMethod
Type: System.StringThe HTTP data-transfer method that was used by the client (DELETE, HEAD, or PUT).
Return Value
Type: System.Web.Mvc.MvcHtmlString
The override method that uses the HTTP data-transfer method that was used by the client.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The httpVerb parameter is not "PUT", "DELETE", or "HEAD". |
Return to top