Formal:
* 您贵姓? (Nín guìxìng?) - This is the most polite and formal way to ask someone's surname. It literally means "What is your honored surname?"
* 请问您叫什么名字? (Qǐngwèn nín jiào shénme míngzi?) - This means "May I ask what your name is?" and is another very polite option.
Informal:
* 你叫什么名字? (Nǐ jiào shénme míngzi?) - This is a more casual way to ask someone's name. It means "What is your name?"
* 你叫什么? (Nǐ jiào shénme?) - This is an even more informal way to ask someone's name, and is often used among friends.
In a specific context:
* 请问您是...吗? (Qǐngwèn nín shì ... ma?) - This means "May I ask if you are...?" You would then follow it with the name you are asking about. For example, "请问您是李先生吗?" (Qǐngwèn nín shì Lǐ xiānsheng ma?) means "May I ask if you are Mr. Li?"
Remember that the appropriate way to ask someone's name depends on the situation and your relationship with the person.