0

i need to change my URL in my project

i have article "http://localhost:43524/home/Books/2"

the name for this article= "buy books free"

i went change this URL To

"http://localhost:43524/home/Books/buy-books-free"

and like Customizing Routes in ASP.NET MVC

how use the article title in my URL > how make it ?

Community
  • 1
  • 1
  • I guess this should answer your question :) http://stackoverflow.com/questions/23856068/custom-url-routing-in-asp-net-mvc-4 – Ahmed Kamal Mar 16 '16 at 19:54
  • This is called a slug route. Refer to [this answer](http://stackoverflow.com/questions/30349412/how-to-implement-url-rewriting-similar-to-so/30363600#30363600) for one method of implementing it (but that still relies on passing the `ID` as well so that entering `.../home/Books/2` will result in `.../home/Books/2/buy-books-free` (i.e. the same as your seeing in the address bar now) –  Mar 17 '16 at 00:44

0 Answers0