ASCII Character Help for Validation

  • Thread starter Thread starter MikeY
  • Start date Start date
M

MikeY

Hi everyone,

I've been scratching my head on finding the ASCII number code for the
"Return Key" and for "Space" for when you want to put allowing space between
two names. This is because (lol) trying to read my ASCII charts are a
challlange. Plus if anyone has a good link or ASCII chart they can pass
along or send/link me where I can get a good chart would be helpfull.

This is for C#, WinForms, event validation. So that I can include it with my
code that follows:

public void Number_Validate(object sender,
System.Windows.Forms.KeyPressEventArgs e)
{
if(!Char.IsNumber(e.KeyChar) && e.KeyChar != (char)8 && e.KeyChar != 13)
{
e.Handled = true;
MessageBox.Show("Please Enter a Valid Number","Number Validation",
MessageBoxButtons.OK);
}
}

Thank you all in advance

MikeY
 
Hi Greg,

Thank you for the link. This is exactly what I was looking for. Very good
site.

MikeY
 
Back
Top