keith1001
asked on
Visual basic .net - Try Catch Ex.Exception get actual error number
I have the following below and it shows a message like
404 not found
401 not authorized
How would I just get the error number?
Catch ex As WebException
MsgBox(ex.Message)
404 not found
401 not authorized
How would I just get the error number?
Catch ex As WebException
MsgBox(ex.Message)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You could use the err object instead that gives err.number but I don't think you can use this in a try catch. You basically are going back to the vb6 way of error handling.