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

email - PHP mail error ... failed to open stream : permission denied -

c# - ListView onScroll event -

c - Linux mmap() error -