紀錄新舊 MVC 寫法(Razor v.s. tag)的比對,遇到的時候隨時更新本文
Ajax的部分直接參考上一篇文章
@Html.EditorFor(m => m.Name)
<input asp-for="Name" />
@Html.DropDownListFor(m => m.City, cityList)
<select asp-for="City" asp-items="cityList"></select>
@Html.Partial("_PhoneView", Model.Phone)
<partial name="_PhoneView" for="Phone" />
@Html.ActionLink("link text", "Action", "Controller", new { id = "123" }, null)
<a asp-controller="Controller" asp-action="Action" asp-route-id="123">link text</a>