动态设置选择列表中的选定值

我有一个选择列表,我正在使用asp标记助手来创建它。 我想将默认值设置为数据库中当前设置的值

<select asp-for="QualificationTypeId" id="QualificationTypeId"
      asp-items="@Model.QualificationTypes" class="ProgInfoCellWidth">                    
</select>

//@Model.QualificationType
//this is the value I want to set as the default selected
dominick86814082 回答:动态设置选择列表中的选定值

您可以将默认选择的值设置为QualificationTypeId

本文链接:https://www.f2er.com/3163183.html

大家都在问