J
Jack jensen
Hello,
I have the code below
simplified zip code format)
try
{
Convert.ToInt32(tbOShipPostalCode.Text);
}
catch
{
MessageBox.Show("The zip code must be a number.", "Zip code
error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
The user should only see the messagebox when the input is not a number.
But they see message as if the exception was not beeing handled.
"
A first chance exception of type 'System.FormatException' occurred in
mscorlib.dll
Additional information: Input string was not in a correct format.
"
How can i avoid this message?
Many thanks in advance
JJ
I have the code below

try
{
Convert.ToInt32(tbOShipPostalCode.Text);
}
catch
{
MessageBox.Show("The zip code must be a number.", "Zip code
error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
The user should only see the messagebox when the input is not a number.
But they see message as if the exception was not beeing handled.
"
A first chance exception of type 'System.FormatException' occurred in
mscorlib.dll
Additional information: Input string was not in a correct format.
"
How can i avoid this message?
Many thanks in advance
JJ