0
내가 follows-목록 <SelectListItem>()()
@using SkyTracker.Models
@model SkyTracker.Models.Outlet
@{
var outletTypeList = new List<SelectListItem>();
foreach (var item in ViewBag.OutletTypes)
{
//Exception Cannot implicitly convert type 'int' to 'string'
var newType = new SelectListItem { Text = item.OutletTypeName, Value = item.OutletTypeId };
outletTypeList.Add(newType);
}
}
<form method="post" action="@(ViewBag.BaseUrl)OutletManagement/[email protected]">
@Html.LabelFor(m => m.OutletTypeId, new { @class="required"})
@Html.DropDownListFor(m => m.OutletTypeId, outletTypeList, new {required="required" })
</form>
등의 목록을 생성하려고하지만이 foreach 루프에서 예외를 gettting하고 있습니다. 어떤 도움이 필요합니까?