Click here to Skip to main content
15,887,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CSS
Currently the url structure for the sign - up page is:

http://www.ABC.com/Account/Create?subscr=1

I'm wondering how hard it would be to create a "friendly url" for an existing product so it would read something like:

http://www.ABC.com/DiscountOffer
Posted

1 solution

Please try this code

C#
routes.MapRoute(
           "DefaultCustom", // Route name
           "{action}/{Name}", // URL with Action and category
           new { controller = "Account", action = "Action", Name= UrlParameter.Optional } // Parameter defaults
       );


Please check this article

Routing in MVC [^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900