标签:
public class AuthFilterAttribute : ActionFilterAttribute { /// <summary> /// Action执行前处理 /// </summary> /// <param name="actionContext"></param> public override void OnActionExecuting(HttpActionContext actionContext) { HttpContextBase context = (HttpContextBase)actionContext.Request.Properties["MS_HttpContext"];//获取传统context HttpRequestBase request = context.Request;//定义传统request对象 string name = request.Params["name"]; base.OnActionExecuting(actionContext); } }
ActionFilterAttribute OnActionExecuting 获取参数
标签:
原文地址:http://www.cnblogs.com/niaowo/p/4746024.html