ASP.NET MVC Colon in URL
Posted
by
Joe Morgan
on Stack Overflow
See other posts from Stack Overflow
or by Joe Morgan
Published on 2011-01-14T18:52:11Z
Indexed on
2011/01/14
18:53 UTC
Read the original article
Hit count: 168
I've seen that IIS has a problem with letting colons into URLs. I also saw the suggestions others offered here.
With the site I'm working on, I want to be able to pass titles of movies, books, etc., into my URL, colon included, like this:
mysite.com/Movie/Bob:The Return
This would be consumed by my MovieController
, for example, as a string and used further down the line.
I realize that a colon is not ideal. Does anyone have any other suggestions? As poor as it currently is, I'm doing a find-and-replace from all colons (:) to another character, then a backwards replace when I want to consume it on the Controller end.
© Stack Overflow or respective owner