Validate WebForm KeyStrokes

//- ncTools.dll is completely FREE for commercial and Non-commercial use.
using ncTools;

//- Validate Alpha Characters String
if (IsValidKeyStroke.Input("dadadasdaerwerwsa", eInputTypes.AlphaCharacters))
{
     return true; 
}

//- Validate Alpha Numeric Characters String
if (IsValidKeyStroke.Input("1234adadgd", ncTools.eInputTypes.AlphaNumeric))
{
   return true;
}

//- Validate Date type String
if (IsValidKeyStroke.Input("01/02/2021", ncTools.eInputTypes.Date))
{
  return true;
}

//- Validate Email Address String
if (IsValidKeyStroke.Input("johdoe@aol.com", ncTools.eInputTypes.Email))
{
  return true;
}

//- Validate Numeric value String
if (IsValidKeyStroke.Input("1234567", ncTools.eInputTypes.Numeric))
{
  return true;
}

//- Validate US 10 Digits Phone String
if (IsValidKeyStroke.Input("212-555-6666", ncTools.eInputTypes.Phone))
{
  return true;
}

//- Validate US 9 Digits Social Security String
if (IsValidKeyStroke.Input("123-45-6789", ncTools.eInputTypes.SocialSecurity))
{
  return true;
}

//- Validate US 5 Digits Zipcode String
if (IsValidKeyStroke.Input("12345", ncTools.eInputTypes.Zipcode))
{
  return true;
}
Download the ncTools.dll here ncTools.zip

Add Feedback