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 -

sql server - SQL Query - Delete duplicates if more than 3 dups? -

c - Different access levels with PAM -