I'm trying to put a condition to allow only letters to be used
my condition is
if (Regex.IsMatch(txtfirstname.Text, "[A-Za-z]"))
{
usersEl.firstName = txtfirstname.Text;
}
if the txt was only numbers or other symbols, it doesn't go inside the block, and if it was letters it go inside it. but the problem is if it was letters and numbers, it also go inside the block which it shouldn't since there are numbers!
could any one please give me which regular expression should I use if I want it to be ONLY letters or ONLY numbers without any symbols.