C# ASP.NET MVC: Find out whether GET or POST was invoked on controller action -
How do I know if a GET or POST hit my ASP.NET MVC controller action?
You can see the Request.HttpMethod
for it.
If (Request.HttpMethod == "POST") {// Controller was hit with POST} and {// etc. }
Comments
Post a Comment