How to prevent Url.RouteUrl(…) from inheriting route values from the current request
问题 Lets say you have an action method to display products in a shopping cart // ProductsController.cs public ActionMethod Index(string gender) { // get all products for the gender } Elsewhere, in a masthead that is displayed on every page you are using Url.RouteUrl to create HREF links to other pages on the site : <a href="<%= Url.RouteUrl("testimonials-route", new { }) %>" All Testimonials </a> This testimonials-route is defined in global.ascx by the first route below. Notice that the above