我在ViewBag對象進行遍歷時,得到消息「‘對象’不包含‘身份證’的定義:在立即窗口ViewBag迭代問題
@foreach (var f in ViewBag.FundsCenters)
{
<tr>
<td>@f.id
</td>
</tr>
}
然而,我看到:
@f
{ id = 0, center = Top-Level, title = title, amount = 0 }
amount: 0
center: "Top-Level"
id: 0
title: "title"
感謝您的任何幫助