0

I am trying to pass the birdRecords to the get part of the generateSearchResults inside my results controller but it does not go through.

        [HttpPost]
        public IActionResult generateSearchResult([FromHeader] string data)
        {

            var birdRecords = JsonConvert.DeserializeObject<birdDataSolutionVM>(data);

            TempData["birds"] = birdRecords;

            return RedirectToAction("generateSearchResult");
        }

        public IActionResult generateSearchResult()
        {

            var a = TempData["birds"];

            return View();
        }

The problem is that the GET generateSearchResults is never being called. When I place a breakpoint inside the function it never pops up.

BUIBBE
  • 23
  • 1
  • 7

0 Answers0