Url to replace space with Hyphen and other special chars in MVC-Razor
$10-30 USD
Annulé
Publié il y a plus de 8 ans
$10-30 USD
Payé lors de la livraison
I am using ASP.NET MVC Razor C# with Attribute Routes
In my Category form when I click on Edit. it opens the Url like below:
http://localhost:38812/Category/Database%20Design
I am trying to change the Url like below
http://localhost:38812/Category/Database-Design
Here the problem is, when I go to database to search for the category based details..it does not search because there is no category with the name of Database-Design. It exist as Database Design with space.
Is there any way to not include the Id in Url and so we can also achieve the below Url? :
http://localhost:38812/Category/Database-Design
Same query has already been posted here: [login to view URL]
Please check the comments also.