public IActionResult SurveyForm(SurveyFormViewModel model) { IActionResult result = RedirectToAction("SurveyResults"); Survey survey = new Survey { ActivityLevel = model.ActivityLevel, Email = model.Email, ParkCode = model.ParkCode, State = model.State, }; try { TempData["SurveyConfirmation"] = "Your response was added successfully"; int id = _db.SaveNewSurvey(survey); } catch { TempData["SurveyConfirmation"] = "Failed to save survey response"; SurveyFormViewModel surveyVM = new SurveyFormViewModel(); var parkList = _db.GetAllParks(); surveyVM.AllParkCodes = new List <SelectListItem>(); foreach (var park in parkList) { var item = new SelectListItem(); item.Value = park.Code; item.Text = park.Name; surveyVM.AllParkCodes.Add(item); } result = GetAuthenticatedView("SurveyForm", surveyVM); } return(result); }