Is it even possible to return a view from an ActionFilterAttribute? Right now i just have it throw an error and in the OnException in the base controller reroutes to an error page. Would liek to show
In my application (ASP.NET MVC 3) I have a BaseController class that all my Controllers inherit and in that BaseController I have overridden the OnActionExecuting method to check to ensure a Session v
Here\'s the setup. Say I have some action filter that needs an instance of a service: public interface IMyService
I have an ActionMethodSelectorAttribute which i have the following line in: var req = controllerContext.RequestContext.HttpContext.Request.Form.AllKeys.Any() ? controllerContext.RequestContext.HttpC
This is sort of a broad question, but one I am curious about. What are some examples of uses for MVC Global filters? I.E.
In a FilterAttribute I am making in MVC3, I want to开发者_开发问答 set a variable that will be accessible inside my Controller.How can I do this?Is it possible?Thank you.You could put your value in th
I am implementing a collaborative web gallery, and I have a few roles for each user: Admin DeleteImage DeleteOwnImage
I\'ve been implementing a RouteConstraint recently whos responsibility is to Match a custom route value against some model data that is in the session.
Hey there, I\'ve succesfull been able to use property injection in my FilterAttribute, however I\'m wondering whether its possible to move it into the constructor instead?
I currently have 2 filters, Auth and Redirect that do the following: Filter Auth, who implements IAuthorizationFilter and ActionFilter, checks for user login and authorization, and if that fails sets