WebClient.DownloadStringAsync Method (Uri, Object)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Downloads the resource at the specified Uri as a string.
Assembly: System.Net (in System.Net.dll)
Public Sub DownloadStringAsync ( _ address As Uri, _ userToken As Object _ )
public void DownloadStringAsync( Uri address, Object userToken )
The location of the resource to be downloaded.
Provides a user-specified identifier for the asynchronous task.
The address parameter is nullNothingnullptra null reference (Nothing in Visual Basic).
There is not enough memory to continue the execution of the program.
The execution stack overflowed because it contains too many nested method calls.
A call was made to the Thread..::.Abort method to destroy a thread.
This method retrieves the specified resource using the GET method. The resource is downloaded asynchronously. When the download is completed, the DownloadStringCompleted event is raised. The downloaded string is available in the Result property of the DownloadStringCompletedEventArgs. You cannot call the DownloadStringAsync method again on the same WebClient object, until the first string download operation is completed. Doing this causes an exception.
You can use the CancelAsync method to cancel asynchronous operations that have not completed.
If the BaseAddress property is not an empty string and the address does not contain an absolute URI, the address must be a relative URI that is combined with BaseAddress to form the absolute URI of the requested data.
Windows Phone OS
Supported in: 8.1, 8.0, 7.1, 7.0