MVC视图中读取ViewBag传递过来的HashTable表数据

视图中头部添加 @using System.Collections;

循环读取哈希表数据 
 <ul id="AccessView" class="sys_spec_text">
@foreach (DictionaryEntry item in (ViewBag.FieldsValues as Hashtable))
{
<li title="@item.Value">
<a id="@item.Key" lable="@item.Value"><img src="/Content/Images/Icon16/tag_blue.png">@item.Value</a><i></i></li>
}
</ul>



上一篇:python3.7 sys模块


下一篇:POJ 2591