Hi there a quick simple question, i need to be able to validate a textbox
The user must enter a number within the range 0001 to 9999 only.
And in the 4 number format XXXX , e.g. if they enter the number 11 i need it to be formated 0011.
thanks
To perform this kind of validation in C# write down following code in Leave event of textbox.
int l = textBox1.Text.Length;
if (l != 4 || l < 0 || l > 9999)
MessageBox.Show("Invalid No");
else
MessageBox.Show("Valid No");
Make necessary changes in this code so it is execute in VB.net..
Bye...Enjoy Coding