-1
Ich mag speichern Text von Drop-Down, die aus der Datenbank retrived, ich bin in der Lage in siteUm Drop-Down-ID in Text zu umwandeln in SQL speichern
angezeigt, aber jetzt habe ich nur id in SQL-DB bin immer .Please brauchen Vorschlag
Ansicht
<div class="form-group">
<label class="control-label col-sm-3" for="email">Coachings:*</label>
<div class="col-sm-8">@Html.DropDownListFor(model => model.MainCourseId, new SelectList(Model.MainCourseList, "Key", "Value"), "Select Main Course", new { @class = "form-control", required = "required" })</div>
</div>
-Controller
MainCourse = request.MainCourseId.ToString()