直接在for循环里面定义出viewbag
@for (int i = 0; i < ViewBag.permission.Count; i++) { var permission = ViewBag.permission[i]; <div class="Jurisdiction1"> <div class="cols"> <text>管理平台</text> </div> <div class="cols"> <div class="function">基本功能</div> </div> <div class="cols"> <text>@permission.Permission</text> </div> </div> }