We can use the MVC action with the HttpGet or HttpPost attribute to dis-allow the type of HTTP calls.
For example:- We can see in the below example,the ViewEmployee action can only be invoked by HttpGet.If we try to make HTTP POST on ViewEmployee action,then we will get an error.
[HttpGet]
public ViewResult ViewEmployee(int emp_id)
{
Employee_Master emp = Employees[emp_id];
return View("ViewEmployee",emp );
}