I want to pass an integer array from controller to jquery, so that i would be able to collect these values, and on the basis of these values, i'll check checkboxes in partial view.
How can i do this ?
my controller code is as follws:
[HttpGet]
public PartialViewResult EditPartialView(string id)
{
int selectedRoleId = Convert.ToInt32(id);
Role selectedRole = objRP.GetRoleByID(selectedRoleId);
Array RoleAccessMap = entities.RoleAccessMaps.Where(x => (x.Role_ID == selectedRole.Role_ID && x.Project_ID == selectedRole.Project_ID)).ToArray();
int count = RoleAccessMap.Length;
for (int i = 0; i < count; i++)
{
int? RAM_Id = ((AgileMVC_EL.RoleAccessMap[])(RoleAccessMap))[i].RAM_ID;
int? item_id = ((AgileMVC_EL.RoleAccessMap[])(RoleAccessMap))[i].Item_ID;
int? actionValue = ((AgileMVC_EL.RoleAccessMap[])(RoleAccessMap))[i].Action_Value;
// i want to put code for javascript/jquery function here.
}
return PartialView("Edit", selectedRole);
}
I want to pass these values (RAM_ID, item_ID, actioValue) to jquery function.