I have some links in footer of a MasterPage. Home, About, Terms, Contact and so on. The Terms link has NavigateUrl as : "~/en-us/Terms" and for Contact link: "~/en-us/Community/Contact".
In global.asax, my route table is as follow:
routes.MapPageRoute("", "en-us/Terms", "~/EN_US/Terms.aspx"); routes.MapPageRoute("", "en-us/Community/Contact", "~/EN_US/Community/Contact.aspx");
My problem is: I don't add Community/Contact.aspx in my solution yet, so when I click on Contact link, I expect to receive The resource cannot be found error, but it redirects to Terms page. Worse than that, every addresses that not exists, also do the same.
For example, when I try "localhost:1384/en-us/someWords/anotherWords" (Exactly the same), it redirects to Terms page.
I delete cookies, delete browser history, delete ASPTemplate Files, shutdown VS, restart Windows, Clear solution, rebuild it and any thing else. and the problem remains
I use VS.2012, asp.net 4.
After Contact link was clicked, in browser address bar, I see localhost:1384/en-us/Community/Contact, but the content of page is exactly like Term page and I don't know why.
Every links in my solution work fine, except links with "en-us/Community/Contact" navigateUrl.
Thanks in advanced for any suggestions.