ASP.NET 4.0 Routing and Subfolders
- by IrishChieftain
I have a folder structure like this:
Site/About/About.aspx
I have a link in a user control like this:
<a href="~/About/About" id="aboutLink" title="About" runat="server">About</a>
And in my RegisterRoutes() method, I have this:
routes.MapPageRoute("", "About/About/", "~/About/About.aspx");
It works but produces the following URL:
Site/About/About
What I would like is this:
Site/About
Is this possible with out-of-the-box 4.0 routing?