Top "Action-filter" questions

In ASP.

ActionExecutingContext - ActionParameters vs RouteData

Given the following code: public class MyActionFilter : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { var a = filterContext.ActionParameters["someKey"]; var …

.net asp.net-mvc asp.net-mvc-4 asp.net-mvc-routing action-filter
Web API ActionFilter modify returned value

I have a Web API application that I need to get ahold of the return value of some of the …

c# asp.net-web-api action-filter
ASP.NET MVC: Action Filter to set up controller variables?

I have a scenario whereby with every page request I must check the session of the presence of a particular …

asp.net asp.net-mvc action-filter
ASP.NET MVC - Access a controller property in an ActionFilter

I'm using Unity to instantiate a new class into the controller constructor and save the injected class in a property …

asp.net-mvc action-filter
Enforce Action Filter on all Controller Actions (C# / ASP.NET MVC)

I made a new action filter (attribute, similar to [Authorize]) which authorizes access to a controller action based on a …

c# .net asp.net-mvc controller-action action-filter
HTTP module vs action filter in asp.net-mvc

I am developing an application in asp.net MVC3 and I have the following questions: When should I write an …

asp.net-mvc httpmodule action-filter
Change the model in OnActionExecuting event

I'm using Action Filter in MVC 3. My question is if I can crafting the model before it's passed to the …

asp.net-mvc asp.net-mvc-3 model-view-controller action-filter
How can I use data placed into a ViewBag by a filter in my Error.cshtml view?

I have an action filter that is responsible for placing some common information into the ViewBag for use by all …

asp.net-mvc asp.net-mvc-3 action-filter viewbag
Pass an object from ActionFilter.OnActionExecuting() to an ApiController

I wish to create an object per http request within an ActionFilter and pass this object to the controller. So …

asp.net-web-api action-filter
Propagating QueryString parameter in RedirectToAction calls

I want to make sure that a particular parameter in the QueryString, in my case the request_id is propagated …

asp.net asp.net-mvc asp.net-mvc-3 action-filter redirecttoaction