is there any C# method that works similar to Convert.ToBase64String but doesn\'t generate anything except alphanumeric output?
Thanks!
The answers are a bit outdated now. For the benefit of future searchers: The best way to handle this now in C# is:
byte[] b; // fill your byte array somehow
string s = System.Web.HttpServerUtility.UrlTokenEncode(b);
This returns a Base64-encoded string that is URL-safe (which is what you said you were really after in the comments to your question).
You can then decode it again using, you guessed it:
byte[] b = System.Web.HttpServerUtility.UrlTokenDecode(s);