Extend Url Route to apply Url Encoding for each parameter

I ran into a problem that one of my fields should appear in the url, contains a special character (/, \, :).

The stupid way of handling this is to generate action links using UrlEncode (). Then UrlDecode is used before consumption in the controller. But I think this is really stupid, because too many places need to be adapted.

So my problem is to extend the URL route or just write my own to reach it?

Thanks Mike

+3
source share
1 answer

System.Web.Routing.Route GetRouteData GetVirtualPath. URL- , . , , URL- URL- /(% 2f) URL-, .

0

Source: https://habr.com/ru/post/1765558/


All Articles