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

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -