【发布时间】:2010-04-04 14:45:42
【问题描述】:
这是我的 jQuery 代码:
$.get('/Home/GetList', function(data) {
debugger;
$('#myMultiSelect').val(data);
});
这是我的控制器代码:
public ActionResult GetList(int id)
{
int[] bodyParts = _repository.GetList(id);
//how do i return this as an array back to javascript ??
}
如果我有 GetList 函数返回一个整数数组,我如何将它返回给 jQuery 函数?
【问题讨论】:
标签: jquery asp.net-mvc ajax arrays