I am using web client to send some request parameters to server and then get response according to request. But the issue which i face when every i try to send web client request is if Internet gets disconnected while sending request, it will hang my application. Sometimes it crashes the application. My code snippet is give below.
WebClient webClient=new WebClient()
userData = webClient.UploadValues(URL, "POST", parameters);
`
While executing that line if Internet disconnects it hangs the application.