public IActionResult Index() { TempData["Message"] = "Hello, World!"; return RedirectToAction("About"); } public IActionResult About() { ViewBag.Message = TempData["Message"]; return View(); }In this example, TempData is used to store a message and then redirect to the About action. In the About action, the message is retrieved and displayed using ViewBag. The TempData class is part of the ASP.NET Core framework and is located in the Microsoft.AspNetCore.Mvc package.