views:

31

answers:

1

my urls look like:

www.example.com/{languagecode}/{controller}/{action}/{id}

where language code is en-us, etc.

From the OnActionExecuting event, how can I get these values?

+3  A: 
    protected override void OnActionExecuting(System.Web.Mvc.ActionExecutingContext filterContext)
    {
        var languagecode = filterContext.RouteData.Values["languagecode"];

        base.OnActionExecuting(filterContext);
    }
jfar
YEAH! you rock.
BritishDeveloper