Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Route issue with culture based url #11

Open
kamalraturi opened this issue Jun 4, 2015 · 0 comments
Open

Custom Route issue with culture based url #11

kamalraturi opened this issue Jun 4, 2015 · 0 comments

Comments

@kamalraturi
Copy link

I am working on Culture based project. It prefix culture in url. But using LowercaseDashedRoute does not work with it. The code in route config is:

routes.Add(new LowercaseDashedRoute("{culture}/mysite/{parentitem}/{item}/{id}",
new RouteValueDictionary(
new {
culture = String.Empty,
controller = "Items",
parentitem = "Products",
action = "Details",
item = UrlParameter.Optional,
id = UrlParameter.Optional}),
new DashedRouteHandler()
)
);

And Default route is:

routes.MapRoute(
name: "Default",
url: "{culture}/{controller}/{action}/{id}",
defaults: new { culture = String.Empty, controller = "Home", action = "Index", id = UrlParameter.Optional }
);

It makes a url like:
http://localhost:62652/en-US/mysite/Solutions/Paints%2c%20Coatings%20%26%20Adhesives/9

Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant