Title: encrypt and decrypt aspnet                                 If you need copy same format use firefox or chrome or safari but iexplorer not work


Preview of Code
 //method encryption
    private string Encryptpassword(string pass)
    {
        byte[] bytes = System.Text.Encoding.Unicode.GetBytes(pass);
        string Encryptedpassword = Convert.ToBase64String(bytes);
        return Encryptedpassword;
    }
 
    //method decryption
    private string Decryptpassword(string Encryptedpass)
    {
        byte[] bytes = Convert.FromBase64String(Encryptedpass);
        string Decryptedpassword = System.Text.Encoding.Unicode.GetString(bytes);
        return Decryptedpassword;
    }
 
    protected void Button1_Click(object sender, EventArgs e)
    {
        lblencrpt.Text = Encryptpassword(TextBox1.Text);
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        lbldecrypt.Text = Decryptpassword(TextBox2.Text);
    }