Friday, July 5, 2013

How to get RouteData in Application_BeginRequest or Application_EndRequest


RouteData routeData = RouteTable.Routes.GetRouteData(new HttpContextWrapper(HttpContext.Current));
            if (routeData == null) return;
            string action= routeData.GetRequiredString("action");

No comments:

Post a Comment