I have a problem in MVC project in url.
In the Route config I have the following code:
routes.MapRoute(
name: "Test",
url: "{controller}/{action}/{id}/{selected}/{category}/{engineId}",
defaults: new { controller = "Product", action = "SubCategories"}
);
The parameter category contains the name of selected category. In database I have the category with name: "Packet / Set". If in my website I choose this category and in the url will appear this categoryname
SubCategories/92/Bertone-FREECLIMBER-2.0/Packet / Set /33720%E2%80%8B.
I got the
Server Error in '/' Application.
The resource cannot be found.
error. If the the category name doesn't contain the "/" character, evrything works fine:
SubCategories/94/Bertone-FREECLIMBER-2.0/Air%20filter/33720%E2%80%8C%E2%80%8B
Could you advise how should I resolve this?