asp.net mvc3 将数组类型的ViewData复制给JS变量
控制台有如下代码:ViewData["showImg"] = new string[] { "url(Picture/one.jpg)", "url(Picture/two.jpg)", "url(Picture/three.jpg)" }; return View();
如何在视图中将这个ViewData赋值给Javascript变量?
ViewData["showImg"] = new string[] { "url(Picture/one.jpg)", "url(Picture/two.jpg)", "url(Picture/three.jpg)" }; return View();