Reputation: 11895
it works as long as the topic is all lowercase, is there a way to ignore case?
routes.MapRouteLowercase(
"TopicList", // Route name
"{topic}s/{page}", // URL with parameters
new { controller = "Review", action = "Index", id = UrlParameter.Optional, Topic = "AllTopic" },
new { topic = @"(app|book|toy|website|article||alltopic)" }
);
Upvotes: 1
Views: 106
Reputation: 1647
Try this:
new { topic = @"(?i)(app|book|toy|website|article||alltopic)" }
Upvotes: 3