I have web page in asp.net 4 Web forms, that generate this URLs:
http://www.myweb.com/Default.aspx?mode=articles&seo_name=my-best-article
and I want to show url in this format:
http://www.myweb.com/my-best-article
but i need to access original query string (mode and seo_url).
Now Im using this solution:
void RegisterRoutes(RouteCollection routes)
{
routes.MapPageRoute(
"default-page",
"{mode}/{seo_name}",
"~/Default.aspx"
);
}
but it shows both parametrs and I want only seo_name.
How can I do this?
mode
to come from if you don't have it in your url? – cheesemacfly Jun 17 '13 at 14:48