Lets say you have an action method to display products in a shopping cart
// ProductsController.cs
public ActionMethod Index(string gender) {
// get
Maybe I'm missing something here, but why not set it up like this:
In your global asax, create two routes:
routes.MapRoute(
"testimonial-mf",
"Testimonials/{gender}",
new { controller = "Testimonials", action = "Index" }
);
routes.MapRoute(
"testimonial-neutral",
"Testimonials/Neutral",
new { controller = "Testimonials", action = "Index", gender="Neutral" }
);
Then, use Url.Action instead of Url.RouteUrl:
<%= Url.Action("Testimonials", "Index") %>
<%= Url.Action("Testimonials", "Index", new { gender = "Male" }) %>
<%= Url.Action("Testimonials", "Index", new { gender = "Female" }) %>
Which, on my machine resolves to the following urls:
/Testimonials/Neutral
/Testimonials/Male
/Testimonials/Female
I'm not sure if this is an acceptable solution, but it's an alternative, no?