In my previous article I have explained about Dynamically programmatically add contols at run time. In this article I am going to explain how to Encrypt and Decrypt password and other strings in C#.Net.
For explanation I have three textboxes in my page. They are txtOriginal,txtEncrypted and txtDecrypted. And two buttons namely Encrypt and Decrypt. The encrypt button encrypts the text in the txtOriginal textbox and displays it in txtEncrypted textbox. And Decrypt button decrypts the text in txtEncrypted textbox and showa the decrypted original text in the txtDecrypted textbox.
Below is the aspx code
Below is the C# code