public IActionResult Confirm(long eventId, long user, int tZOS, int lang = 1) { bool confirmed = ScheduleDB.Confirm(eventId, user, tZOS, lang, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); string jsFunction = "greet(\"Meeting confirmed!\");"; if (!confirmed) { jsFunction = "warn(\"Meeting could not be confirmed! please contact our staff. Thank you\");"; } TempData["JavaScriptFunction"] = jsFunction; return(RedirectToAction("Index", "Home")); }