0
특정 ActionResults에서 사용하려는 사용자 지정 필터 특성을 사용하여 시도중인 데이터를보고 특정 규칙을 위반 한 값을 설정합니다.사용자 지정 필터 특성에서 ActionExecutingContext 값 변경
그래서;
public class SpecialActionFilter : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
foreach (string value in filterContext.Controller.ValueProvider.Keys)
{
string h = filterContext.Controller.ValueProvider[value].AttemptedValue;
if (h == "1")
{
//set the value of the key to be say "one".
}
}
base.OnActionExecuting(filterContext);
}
}
이 가능합니까?