前台怎么样取viewbag 里面的值
_evn 2016-06-23 03:44:17 public ViewResult AddTemplate()
{
ViewBag.FildName = typeof(FILDTYPE).EnumToSelectList();
//ViewBag.TOField
List<string> listtype = new List<string>();
listtype = _TemplateFacade.Value.GetFieidType().ToList();
ViewBag.TOField = listtype;
return View();
}
viewbag 里面是个list
前台怎么取
var ll = '@ViewBag.TOField';
alert('@ViewBag.TOField');