我需要在客户端加载页面时调用控制器中的"CodeListLookup"
方法两次,具有不同的值。目前它按预期工作,但不是第一次?我通过添加async: false
来解决这个问题。但我需要一个替代解决方案来克服这个问题?下面我添加了Javascript代码?
感谢您的帮助......
JavaScript:
RepairEstimatePriorities: new kendo.data.DataSource({
transport: {
read: {
url: '@Url.Action("CodeListLookup", "GeneralData", new { Area = "Settings" })/?codeListType=PriorityType',
dataType: "json",
contentType: "application/json; charset=utf-8",
type: "GET"
}
}
}),
RepairEstimateServiceTypes: new kendo.data.DataSource({
transport: {
read: {
type: "GET",
datatype: "json",
url: '@Url.Action("CodeListLookup", "GeneralData", new { Area = "Settings" })/?codeListType=ServiceType',
contentType: "application/json; charset=utf-8",
}
}
}),
获得以下错误:
Uncaught TypeError: e.slice is not a function