0
사용자 지정 WebViewPage가 있는데이 클래스에서 ActionFilter에서 초기화해야하는 속성이 있습니다. 이 필터에는 메소드 OnActionExecuting (ActionExecutingContext filterContext)이 있습니다. 내 사용자 지정 WebViewPage에서 속성에 액세스 할 수 있습니까?OnActionExecuting 메서드에서 사용자 지정 WebViewPage의 속성에 액세스하십시오. ASP.NET MVC 5
CustomViewPage
public class BaseViewPage : WebViewPage
{
public List<IAlert> Alerts { get; set; }
public override void Execute() { throw new NotImplementedException(); }
}
ActionFilter
public class MessageFilter : IActionFilter
{
public void OnActionExecuted(ActionExecutedContext filterContext) { }
public void OnActionExecuting(ActionExecutingContext filterContext)
{//I NEED ACCESS HERE TO ALERTS PROPERTY FROM BASEVIEWPAGE
}
}