Using an empty string as action for URL generation (e.g. Url.Action("")) does not work #32

Imported from the CodePlex archive for reference purposes. Support for MvcCodeRouting has ended.

Reported on

… if the route doesn’t have the {action} token, e.g.

routes.MapRoute(null, “”, new { controller = @”home”, action = @”index” }, new[] { “Company.Website.Home” });

Must be changed to this:

routes.MapRoute(null, “{action}”, new { controller = @”home”, action = @”index” }, new { action = @”index” }, new[] { “Company.Website.Home” });

Commented on link

Fixed

** Closed by maxtoroq 1/29/2011 9:26 PM

Commented on link

Edit