I am trying to prevent the
Regex regex = new Regex(@"^[a-zA-Z0-9]*$");
Match match = regex.Match(txtName.Text);
DisplayMsg("Name contains invalid character");
Rather than preventing users from entering (especially if they are copying and pasting), you'd be better off replacing the character yourself if you really need to get rid of it:
txtName.Text = txtName.Text .Replace((char) 0x2018, '\'') // ‘ ‘ .Replace((char) 0x2019, '\'') // ’ ’ .Replace((char) 0x201C, '"') // “ “ .Replace((char) 0x201D, '"'); // ” ”
This way, you won't get in the way of your users and you'll still remove this character.
However, it does sound like you might be building up queries using string concatenation, and this is a more serious problem!