早上好,我是 vb.net 和 asp.net 语言的初学者,我遇到了这个异常,我想知道我应该在哪里定义这个 ViewData 项......
例外:
There is no ViewData item of type "IEnumerable <SelectListItem>" with key "typeId."
异常所指的代码行:
<label>Type: @Html.DropDownList("typeId", DirectCast(ViewBag.Type, IEnumerable(Of SelectListItem)), New With { key.id = "typeId" })</label>