0
@{
foreach (CaseCount cc in @Model.CaseCounts)
{
<tr>
<td>@cc.Country</td>
<td>@string.Format("{0:n0}", cc.RegisteredCases)</td>
<td>@Html.DropDownList("Reports", new SelectList(@Model.ReportList, "Value", "Text"), new { onchange = "window.location.href='Reports/RenderReport/' + this.value + '/' + @cc.Country;" })</td>
</tr>
}
}
@ cc.Country不被识别。在控制器的动作不会被触发:(剃须刀onchange不承认@variable
如果我删除@ cc.Country或者干脆把它硬编码,它的工作原理
你能请张贴渲染HTML – rhughes