I need to encode a URL in a class library assembly where I don't want to reference System.Web. URL contains several spaces
https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.quote where symbol in ("YHOO","AAPL")&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=
When I use System.Net.WebUtility.UrlEncode (), spaces are replaced with "+", which does not work. I need to be replaced with% 20
How can I achieve this without reference to System.Web?
source share