Categories

1 Answer

Aug 18, 2019
We can decorate the MVC action by “HttpGet” or “HttpPost” attribute to restrict the type of HTTP calls. For instanceyou can see in the below code

snippet the “DisplayCustomer” action can only be invoked by “HttpGet”. If we try tomake Http post on “DisplayCustomer” it will throw an error.

[HttpGet]

public ViewResult DisplayCustomer(int id)

{

Customer objCustomer = Customers[id];

return View("DisplayCustomer",objCustomer);

}
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Aug 18, 2019 in MVC Language
Aug 18, 2019 in MVC Language
Aug 18, 2019 in MVC Language
...