public IActionResult AddTask([FromForm] int eventId, [FromForm] string taskName, [FromForm] string taskDescription, [FromForm] int serialNumber, [FromForm] string mapNameAndId) { int start = mapNameAndId.IndexOf("#"); int mapId = Convert.ToInt32(mapNameAndId.Substring(start + 1)); string userID = HttpContext.User.FindFirstValue(ClaimTypes.Email); string currentUser = ds.GetNickname(userID); ViewData.Add("currentUser", currentUser); ds.AddTask(eventId, serialNumber, taskName, taskDescription, mapId); return(RedirectToAction("ShowEvent", "Events", new { @eid = eventId })); }