Does asp.net mvc Url.Content do string encoding?

Does asp.net mvc Url.Content generate an input encoding, or should I use Url.Encode on top of it?

+3
source share
2 answers

No.

According to http://msdn.microsoft.com/en-us/library/system.web.mvc.urlhelper.content(VS.90).aspx it only extends the ~ character. If this symbol does not exist, the path is returned since it was transmitted.

You can also test it. Using ASP.Net 4.0 is not for me.

+2
source

The Content method simply converts the virtual path to the absolute path of the application. What needs to be encoded?

0
source

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


All Articles