I need fire a filter method with all string in GET or POST value from http request before it was bind into controller action
Can i do it in Global.asax.cs? and if yes, can u give me more details or example (great) about this?
I need fire a filter method with all string in GET or POST value from http request before it was bind into controller action
Can i do it in Global.asax.cs? and if yes, can u give me more details or example (great) about this?
You can do it in Global.asax.cs for all requests by
protected void Application_BeginRequest(object sender, EventArgs e) {
//Look at HttpContext.Current.Request to grab request values
}
Model binding occurs before action filters run. If you want to write a filter that runs before model binding, you could write an IAuthorizationFilter which runs before model binders.