I'm not sure how much this is possible in an ASP.NET application, but take a look at System.Security.SecureString .
This will allow you to fill in a string that is encrypted using encryption on the computer (your server). You will need to marshal this object on a usable (and decrypted) string when needed, and in my opinion, some of them are separated by their usefulness - I think there are ways and when to use it, and not.
source
share