////databse coonection SqlConnection con = new SqlConnection("server=ARETE-4;Initial catalog=test;uid=sa;pwd=;"); con.Open(); SqlDataAdapter ad = new SqlDataAdapter("select Name as s from contacts where id='5'", con); DataSet ds = new DataSet(); ad.Fill(ds,"t1"); String s1 = ds.Tables[0].Rows[0][0].ToString(); // Setup the encryption object for 128-bit AES encryption. Chilkat.Crypt crypt = new Chilkat.Crypt(); crypt.UnlockComponent("UnlockCode"); crypt.SetAlgorithmRijndael(); crypt.KeyLength = 128; crypt.SetSecretKeyViaPassPhrase("myPassword"); // Encrypt Unicode characters (2 bytes per character) System.Text.UnicodeEncoding enc = new System.Text.UnicodeEncoding(); TextBox1.Text =crypt.DecryptStr(crypt.DecodeBase64(s1)); String s3=TextBox1.Text; String s2 = textBox2.Text; if (s3 == s2) { Response.Write(""); } else { Response.Write(""); } }