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>

 




posted @ 2016-07-01 13:33  代码沉思者  阅读(1001)  评论(0编辑  收藏  举报