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?
protected override void OnActionExecuting(System.Web.Mvc.ActionExecutingContext filterContext)
{
var languagecode = filterContext.RouteData.Values["languagecode"];
base.OnActionExecuting(filterContext);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With