I hard code values into the ViewBag and TempData but they do NOT show in the view.

Why?
I am NOT redirecting, just rendering - returning the view name with a model class.
Part of the BlogPublishedSelectionCriteria.cshtml view:
@model GbngWebClient.Models.BlogPublishedSelectionCriteriaVM
Blog Selection Criteria
@{
Layout = "~/Views/Shared/_LayoutUser.cshtml";
}
@TempData["errormessage"]
@ViewBag.errormessage
The last part of the action method before returning the view:
ViewBag.errormessage = "test";
TempData["errormessage"] = "test";
return View("BlogPublishedSelectionCriteria", blogPublishedSelectionCriteriaVM);

Guest User122 reputationPosted Aug 6, 2020, 10:07 AM EDT
Jayant TripathyRank #1,432 · 1.1K reputationPosted Aug 6, 2020, 11:13 AM EDT
First LastRank #2,033 · 713 reputationPosted Aug 6, 2020, 11:16 AM EDT