A
Alex Stevens
Hi All.
I have a try catch block which may encouter an error with an empty field:
***** Code Start *****
Try
txtPartNumber.Text = Datarow.Item("PartNumber")
txtPartDescription.Text = Datarow.Item("PartDescription")
txtPartNumber.Text = Datarow.Item("PartNumber")
Catch ex as system.exception
End Try
***** Code End *****
I would like to use something like the old on error resume next, which would
ignore the error and continue with the next line of code.
How would i do this in this example?
One way is to enclose each statement in a try catch itself, but this makes
the code look terrible, whereby it was easy enought pre-,net with the on
error resume next.
Many Thanks
Alex Stevens
I have a try catch block which may encouter an error with an empty field:
***** Code Start *****
Try
txtPartNumber.Text = Datarow.Item("PartNumber")
txtPartDescription.Text = Datarow.Item("PartDescription")
txtPartNumber.Text = Datarow.Item("PartNumber")
Catch ex as system.exception
End Try
***** Code End *****
I would like to use something like the old on error resume next, which would
ignore the error and continue with the next line of code.
How would i do this in this example?
One way is to enclose each statement in a try catch itself, but this makes
the code look terrible, whereby it was easy enought pre-,net with the on
error resume next.
Many Thanks
Alex Stevens