I want to encrypt some text in URL with a simple java-script algorithm and then decrypt it at code behind of an ASP.NET page using C#.
ROT13 is a good choice but unfortunately I cannot use it due to some confidential details. Anything like that would help but I don’t know the famous ones. Security is not a matter at all, just twisting the string in some way and retrieve it later.
Caesar cipher is a quite simple method for encrypting a text. Or you could simply encode the text in BASE64, which also makes it hard to read for humans. BASE64 naturally offers no security at all, but you can use standard libraries for encoding and decoding.