How should I validate textbox for only accepting numbers, only alphabets other important validations that could be needed. Using properties window of visual studio. Or any other best way.
private void txt5ValGood_TextChanged(object sender, EventArgs e)
{
if (System.Text.RegularExpressions.Regex.IsMatch(txt5ValGood.Text, "[^0-9]+"))
{
txt5ValGood.Text = System.Text.RegularExpressions.Regex.Match(txt5ValGood.Text, "[0-9]+").ToString();
}
}