Bhavesh Vankar

Bhavesh Vankar

  • 761
  • 1.1k
  • 88k

global asax url rewrite

Aug 5 2021 10:48 AM

can i display sub navigation bar name with its main menu name

suppose my main navigation bar name is :- Services

and sub menu is  :- Web Designing, software Developing, Hosting etc.

if user click on Software Developing then  it's url should be display on address bar like

Services/Software-Developing

can it possible and how to write it....?

i have try it as below....

    public static void RegisterRoutes (RouteCollection urlRouting)
    {
        urlRouting.MapPageRoute("", "Home", "~/Home.aspx");
        urlRouting.MapPageRoute("", "About", "~/About.aspx");
        urlRouting.MapPageRoute("Services", "Web-Developing", "~/WebDeveloping.aspx");
        urlRouting.MapPageRoute("Services", "Web-Hosting", "~/WEbHosting.aspx");
        urlRouting.MapPageRoute("Services", "Software-Developing", "~/SoftwareDeveloping.aspx");
    }

 

but its not working how to do it...?


Answers (3)