C# MVC @Html.DropDownList 不通过后端,在前端构建一个下拉Select并可自动选择选中值

 

@Html.DropDownList("verType", new SelectList(new[] { new { Name = "A版", Value = "per" }, new { Name = "B版", Value = "ent" } }, "Value", "Name", Request.QueryString["verType"]), "所有版本", new { @style = "height:30px;padding:2px;" })

 

posted @ 2023-05-22 16:17  James·wang  阅读(42)  评论(0编辑  收藏  举报