How to create a MapRoute that accepts slashes without considering it a new parameter? If url
http://localhost/root/p1/default.aspx
I want one parameter to take everything after localhost (root / p1 / default.aspx). Usually, this would require three parameters, because there are two slashes, and maproute separates the slash parameters. Therefore, if the route looks something like this:
routes.MapRoute( "URLMapRoute", "{path}", new { controller = "Home", action = "Index", path = "default.aspx" } );
then {path} selects everything, although the url contains slashes.
source share