Why doesn't a URL Route with two dashes resolve?

Posted by Atomiton on Stack Overflow See other posts from Stack Overflow or by Atomiton
Published on 2010-04-16T22:41:07Z Indexed on 2010/04/16 22:43 UTC
Read the original article Hit count: 295

Filed under:
|
|
|

I'm trying to resolve this URL Route:

Route articlesByCategory = new Route("articles/c{cid}-{category}", new Handler);

However, it seems like the following url won't resolve to this route:

// doesn't work
www.site.com/articles/c24-this-is-the-category-title

// This works
www.site.com/articles/c24-category

I assume it has to do with the dashes in the title, but can anyone tell me why this works this way?

Is there a way to allow dashes in the title for a URL route like this?

© Stack Overflow or respective owner

Related posts about url-routing

Related posts about ASP.NET