Formal:
* Fue un placer conocerle. (This is the most formal and polite option.)
* Encantado/a de conocerle. (This translates to "Delighted to meet you.")
Informal:
* Mucho gusto. (This is a very common and friendly way to say it.)
* Un gusto conocerte. (This is a bit more informal than "Mucho gusto.")
* Fue agradable conocerte. (This translates to "It was nice to meet you.")
You can also add a compliment to make it even more friendly:
* Fue un placer conocerte. Me ha gustado mucho hablar contigo. (It was a pleasure to meet you. I enjoyed talking with you.)
* Encantado/a de conocerte. Eres muy simpático/a. (Delighted to meet you. You're very nice.)
The best option will depend on the context and your relationship with the person you are speaking to.