In MVC 3, is it possible to determine if an action is a result of a POST or GET method? I know you can decorate the actions with [HttpPost] and [HttpGet] to fire a specific
The HttpMethod property on the HttpRequest object will get it for you. You can just use:
HttpRequest
if (HttpContext.Current.Request.HttpMethod == "POST") { // The action is a POST. }
Or you can get the Request object straight off of the current controller. It's just a property.