【发布时间】:2011-11-03 20:47:30
【问题描述】:
我正在调用 webmethod 以在 jquery 中返回字符串数组。常规的一维字符串数组是这样的
[WebMethod]
public static string[] GetNewRow() {
var listOfItems = new List<string>();
// populate the listOfItems here
listOfItems.Add("100");
// more here
return listOfItems.ToArray();
}
是否可以返回多维数组?
【问题讨论】:
-
你能展示什么结构是理想的吗?真的只是一个 [][] 吗?
-
jquery 可接受的任何结构。我尝试返回多维字符串 (string[,]),但在 jquery 中它被视为一维数组。如果可能的话,我想用两个参数 [a][b] 来引用它
标签: jquery multidimensional-array