title: ASP.NET MVC Url.Action and route name value
body: <p>I am using asp.net mvc 2 and create localization based on routes.</p>
  
  <ol>
  <li>my route looks like: <code>{culture}/{controller}/{action}</code> </li>
  <li>I go to my home controller: <code>en/Home/Index</code></li>
  <li><p>my home controller view have a links to other controllers:</p>
  
  <pre><code>&lt;a href='&lt;%= Url.Action("Prods","Products") %&gt;' &gt;Products&lt;/a&gt;
  &lt;a href='&lt;%= Url.Action("Index","About") %&gt;' &gt;About&lt;/a&gt;
  </code></pre></li>
  </ol>
  
  <p>First link generated code: <code>/en/Products/Prods</code> but second one generate: <code>/Home/Index</code></p>
  
  <p>I can't understand why <code>Url.Action</code> skips the <code>{culture}</code> route parameter when I pass value <code>Index</code> in argument action? What am I doing wrong?</p>
  
  <p>Route configuration:</p>
  
  <pre><code>routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
  routes.MapRoute("Login", // Route name
                  "{controller}/Index", // URL with parameters
                  new { controller = "Login", action = "Index" } // Parameter defaults
                  ).RouteHandler = new SingleCultureMvcRouteHandler();
  
  routes.MapRoute("Default", // Route name
                  "{controller}/{action}/{id}", // URL with parameters
                  new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
                 );      
  </code></pre>
  
  <p>Then</p>
  
  <pre><code>foreach (Route r in routes)
  {
      if (!(r.RouteHandler is SingleCultureMvcRouteHandler))
      {
         r.RouteHandler = new MultiCultureMvcRouteHandler();
  
         r.Url = "{culture}/" + r.Url;
  
         if (r.Defaults == null)
         {
            r.Defaults = new RouteValueDictionary();
         }
  
         r.Defaults.Add("culture", "en");
  
         if (r.Constraints == null)
         {
            r.Constraints = new RouteValueDictionary();
         }
  
         r.Constraints.Add("culture", new CultureConstraint(cultures));
      }
   }
  </code></pre>
  
  <p>Thanks for all help</p>