I am using webclient class to post some data to a web form. I would like to get the response status code of the form submission. So far I've found out how to get the status code if there is a exception
Catch wex As WebException
If TypeOf wex.Response Is HttpWebResponse Then
msgbox(DirectCast(wex.Response, HttpWebResponse).StatusCode)
End If
However if the form is submitted successfully and no exception is thrown then I won't know the status code(200,301,302,...)
Is there some way to get the status code when there is no exceptions thrown?
PS: I prefer not to use httpwebrequest/httpwebresponse