I write ASP.NET MVC application and I found out for me an interesting thing. When I use in View:
@using (Html.BeginForm("Login", "Home", FormMethod.Post))
a method Login of class HomeController is called. But if I write this html into View:
<form action="@Url.Action("Login", "Home")" method="post">
(form action is leading to the same action of the same controller) it is Index action called instead. Why? In both cases the same html below is rendered:
<form action="/Home/Login" method="post">
Thanks