Mih*_*abo 0 model-view-controller asp.net-mvc-3
我正在尝试在我的视图中访问字典.但是以下语法:
@{
var indexList = Viewbag.IndexList as Dictionary<int,long>;
}
Run Code Online (Sandbox Code Playgroud)
不起作用:The name 'Viewbag' does not exist in the current context
PS:尝试在Viewbag之前放置'@',仍然无法正常工作.
有人可以帮忙吗?提前致谢
是不是ViewBag?
var indexList = ViewBag.IndexList as Dictionary<int,long>;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5403 次 |
| 最近记录: |