URL routing in ASP page

烂漫一生 提交于 2019-12-25 16:53:51

问题


The Actual Address is

www.Domain/nav/Default.aspx
www.Domain/nav/Fruit/Apple.aspx

All I want is to hide the 'nav' and 'aspx' text from address.

www.Domain/Default
www.Domain/Fruit/Apple

I tried some Code in Global.asax file

RouteTable.Routes.MapPageRoute("PageRoute", "{0}", "~/{0}.aspx");
RouteTable.Routes.MapPageRoute("PageRoute", "{0}", "~/nav{0}/{0}.aspx");

But its no way working, Can anyone please help me out with the correct code order

来源:https://stackoverflow.com/questions/21826642/url-routing-in-asp-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!