below is the controller:
public class HomeController : Controller
{
public ViewResult Index() => View("SimpleForm");
public ViewResult ReceiveForm(string name, string city) => View("Result", $"{name} lives in {city}");
}
and the SimpleForm.cshtml is:
<form method="post" asp-action="ReceiveForm">
<div class="form-group">
<label for="name">Name:</label>
<input class="form-control" name="name" />
</div>
<div class="form-group">
<label for="name">City:</label>
<input class="form-control" name="city" />
</div>
<button class="btn btn-primary center-block" type="submit">Submit</button>
</form>
so when I run the application, the default Index action is used, so then I fill up the form and click submit button to trigger a post request and direct to ReceiveForm action, which display the result in a view. So now the URL on my browser is /Home/ReceiveForm and I reloaded a browser, and realized a new post request is triggered, but how come it is post request, should it be a get request? isn't that reloading the browser is the same thing as copy /Home/ReceiveForm
into the browser's address bar and press enter, which always trigger get requests?