问题描述
publicViewResultAddTemplate(){ViewBag.FildName=typeof(FILDTYPE).EnumToSelectList();//ViewBag.TOFieldList<string>listtype=newList<string>();listtype=_TemplateFacade.Value.GetFieidType().ToList();ViewBag.TOField=listtype;returnView();}viewbag里面是个list前台怎么取varll='@ViewBag.TOField';alert('@ViewBag.TOField');
解决方案
解决方案二:
@foreach(variin(List<strring>)ViewBag.TOField){@i}
解决方案三:
引用1楼Yizhoujimoqitian的回复:
@foreach(variin(List<string>)ViewBag.TOField){@i}
string,多写了一个r
时间: 2024-11-04 00:38:52