I have really weird problem with url routing. I defined 3 routes for menu bar like that
routes.MapPageRoute("Article", "Article/{id}/{title}", "~/article.aspx");
routes.MapPageRoute("Contact", "Contact", "~/contact.aspx");
routes.MapPageRoute("Category","Category/{id}/{name}","~/category.aspx");
when i click to contact i get www.website.com/Contact and then i click to an article i get www.website.com/Article/id/title and all links are working.
However when i click an article firstly and then click contact, i have www.website.com/Article/id/title/contact, or www.website/category/id/name/contact
This problem only occurs when clicking from parameter routes to nonparameter routes. I will be glad if u give any idea. Thank you.
<a href='<%# GetRouteUrl("Article", new { id = Eval("ArticleID") ,title=Eval("ArticleTitle") })%>'>and my nonparameter link in menubar is<a href="Contact">Contact</a>