ThinkGeo.com    |     Documentation    |     Premium Support

Pass two parameter throw ajaxcallaction

hi
i am new in map suite
i want to pass two arg throw ajaxcallaction to my action displaymap which recieved two paramter
thanks

view
Map1.ajaxCallAction(“Default”, “DisplayVehicles”, { route_id: $(’#ddroute’).val(), station_id: $(#ddstation).val() }, function (result) {

controller:
public ActionResult DisplayVehicles(Map map, GeoCollection args)

Hi Mohamed,

Please add the “MapActionFilterAttribute” to the action DisplayVehicles like below:

[MapActionFilter]
public ActionResult DisplayVehicles(Map map, GeoCollection args)
{
}

And then you can get the values by index like below.
args[0] or args[“route_id”]

Thanks,
Peter