I think there is a misunderstanding about URL encoding. URL encoding is the process of taking text and making it such that it is usable inside a URL without invalidating the URL. There are some characters that cannot appear in a URL without causing problems such as ? and /. Other characters may cause problems (like spaces). URL encoding is the process of taking a string and converting those characters to their equivalent value so they can be used in a URL. If a string has no need for encoding then it doesn't do anything. For example my home
would convert to my%20home
or my+home
. But test
would remain unchanged. URL encoding only changes invalid characters.
Are you sure you have to convert the entire search text to its numeric equivalent? That doesn't make any sense to me as it would be non-standard with how URLs work. IIRC what you're asking for is decimal encoding, is that correct? If so then there is no out of the box solution that I'm aware of but the Uri.HexEscape does convert a single character so you can create a method to do it. Perhaps something like this (not tested).
Public Shared Function DecimalEncode(value As String) As String
Return String.Join("", value.Select(Function(x) Uri.HexEscape(x)))
End Function
If it is base 64 encoded then that is built in.