I need to call a JavaScript function in a Controller function. My code looks like the following:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(DeviceLocation locationToEdit)
{
var originalLocation = (from m in _db.DeviceLocations
where m.Id == locationToEdit.Id
select m).First();
if (!ModelState.IsValid)
return View(originalLocation);
_db.ApplyCurrentValues(originalLocation.EntityKey.EntitySetName, locationToEdit);
_db.SaveChanges();
Utility.mostRecentLocationUpdate = locationToEdit;
/******************************************
need to call updateMap() JavaScript function
*******************************************/
return RedirectToAction("Locations");
}
Thanks!