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 ?

2
  • I guess this should answer your question :) stackoverflow.com/questions/23856068/… Commented Mar 16, 2016 at 19:54
  • This is called a slug route. Refer to this answer 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) Commented Mar 17, 2016 at 0:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.