If any one will came across this in the future:
After some digging I have found out that Uri.EscapeDataString
is the preferable option. See the the highest voted answer here and this post.
EDIT: Adding the information from the second link here:
We found that in some cases you need to consider using Uri.EscapeDataString. In our case we are encrypting the querystring and found that UrlDecode is converting a plus (+) to space. This was causing us errors during decryption. Using Uri’s Escape and UnescapeDataString makes sense for us when constructing a custom querystring in the URL.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…