MVC use action attributes to map the same view for http get or post:
[HttpGet] public ActionResult Index() { ViewBag.Message = \"Message\"; retur
For dot net core it is:
Context.Request.Method == "POST"