net core page post select list

  • 50
  • 0

net core page post select list

前端 

    @Html.DropDownList("TOOL", null, null, new { size = 5, style = "width:200px" })<br />

後端 記得要 [BindProperties]喔

        public string tool { get; set; } = "";

這樣就可以取到select value