I am trying to add page routing (I use regular asp.net 4.0, not mvc), so that when a user goes to:
http://sitename.com/public/member/view/andrey
they would get to: http://sitename.com/public/memberprofile.aspx?userName=andrey
I added following in Global.asax:
protected void Application_Start(object sender, EventArgs e)
{
RouteTable.Routes.MapPageRoute("MemberViewRoute",
"Public/View/Member/{username}",
"~/Public/MemberProfile.aspx");
}
But when I try going to http://sitename.com/public/member/view/andrey in my browser, I get 404
Is there anything else that needs to be done for this routing to work other than adding a page route map?
Thanks!