I am trying to send array object to mvc controller from kendo datasource read methods and unable to bind parameter studentId
in GetAllStudentDetails
Methods.
var studentId=[1,2,3]
var preSelectStudentDataSource = new kendo.data.DataSource({
transport: {
read: {
url: '/Manage/Students/GetAllStudentDetails',
dataType: "json",
contentType: "application/json;charset=utf-8",
data: { studentId: studentId}
}
},
schema: {
success: "success",
message: "message",
data: "data",
model: {
id: "StudentId"
}
},
autoBind: true
})
In Controller Side
public JsonResult GetAllStudentDetails(int[] studentId)
{
JsonResult result = null;
// Code
return result;
}