Asp.Net core Tempdata and redirecttoaction not working
问题 I have a method in my basecontroller class that adds data to tempdata to display pop-up messages. protected void AddPopupMessage(SeverityLevels severityLevel, string title, string message) { var newPopupMessage = new PopupMessage() { SeverityLevel = severityLevel, Title = title, Message = message }; _popupMessages.Add(newPopupMessage); TempData["PopupMessages"] = _popupMessages; } If the action returns a view, this works fine. If the action is calling a redirectotoaction I get the following