Abort
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Cancels the downloader request and resets properties to their initial state.
downloaderObject.Abort()
Remarks
The Abort method cancels the downloader request that has been executed by using the Send method of the Downloader object. In addition, Abort resets the following Downloader properties to their initial state.
Property name |
Initial state |
---|---|
0 |
|
0 |
|
Empty string |
Example
The following JavaScript example shows how to invoke the Abort method:
// Cancel the download with a mouse click.
function onLeftMouseButtonUp(sender, eventArgs)
{
// Cancel Downloader activity and restore state.
downloader.abort();
}