This project is read-only.

~ and URL Routing

Jul 16, 2013 at 7:14 AM
Edited Jul 16, 2013 at 7:16 AM
Hi Graham,

This may not be specific to Navigation, however when I try and use the following dialog config:
  <dialog key="Index" initial="index" path="~/Default.aspx">
    <state key="index" page="~/Views/Index/Default.aspx" Route="~"></state>
I get an exception:
The route URL cannot start with a '/' or '~' character and it cannot contain a '?' character.
If I omit the Route attribute, the url is redirected to the ~/Views/Index/Default.aspx page (as expected).

Is there a way to ensure that the routing shows http://site/ instead of http://site/Views/Index/Default.aspx?
Jul 16, 2013 at 6:04 PM

Yep, that's a Web Forms routing issue rather than a Navigation one.

The only way I can think of doing that is to change the default document within IIS. So, rather than pointing it to Default.aspx you could change it to Views/Index/Default.aspx (or to the route if you've configured one against the State).

Apr 25, 2014 at 6:14 PM
I think Web Forms routing does support blank routes so I've raised Issue #4 to bring in Navigation support for this
Apr 25, 2014 at 11:25 PM
In the next release the blank route can be configured using ~ (see Issue #4).