else if (vReadData.Length==14 && vReadData Is Numeric)
{
if (txtIPLoad_MHEBarcode1.Text == "")
{
txtIPLoad_MISBarcode1.Text = vReadData;
txtIPLoad_MHEBarcode1.Focus();
}
else
{
txtIPLoad_MISBarcode2.Text = vReadData;
txtIPLoad_MHEBarcode2.Focus();
}
mMessage("Scan", "Please scan the MHE Barcode!");
return;
}
This is my code for validating a Textbox. I check the condition that the length should be 14 chars. I must also check that the input which comes in variable vReadData must be numeric (only numbers). Please help me solve this.
I have tried using
else if (Int64.TryParse(vReadData, out num))
but this is not helping me.