您可以ViewBag在ViewResult其中设置要传递给视图的viewBag项目的属性 .您可以将动态对象设置为值.
ViewBag
ViewResult
filterContext.Result = new ViewResult { ViewName = "~/Views/Shared/Info.cshtml" , ViewBag= { Message="SS",Title="Hi title"} };