📜  asp.net core 3.1 将 system.string[] 转换为 javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:01.652000             🧑  作者: Mango

代码示例1
//Controller content
string[] array = {"Value1", "Value2", "Value3", "Value4"};
ViewData["Array"] = array;
//OR
List array = new List();
array.Add("value1");
ViewData["Array"] = array.ToArray();
//View content