Skip to main content
All docs
V25.1
  • AsyncDownloadPolicy.Probing Event

    Allows you to spot the probing of external resources before an actual attempt to download data.

    Namespace: DevExpress.Data

    Assembly: DevExpress.Data.v25.1.dll

    NuGet Package: DevExpress.Data

    Declaration

    public static event AsyncDownloadPolicy.WeakEventHandler<AsyncDownloadPolicy.ProbingEventArgs> Probing

    Event Data

    The Probing event's data class is AsyncDownloadPolicy.ProbingEventArgs. The following properties provide information specific to this event:

    Property Description
    Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
    IsTrustedUri Gets whether the processed resource is in a “safe” resource whitelist. Inherited from AsyncDownloadPolicy.AsyncDownloaderCancelEventArgs.
    ThrowOnNonTrustedUri Gets or sets whether to throw an exception for unwanted download requests. Inherited from AsyncDownloadPolicy.AsyncDownloaderCancelEventArgs.
    Uri Gets the processed resource identifier. Inherited from AsyncDownloadPolicy.AsyncDownloaderCancelEventArgs.

    Remarks

    void OnProbing(object sender, ProbingEventArgs e) {
        var shouldClose = XtraMessageBox.Show("Notification",
            "Probing the " + e.Uri.AbsoluteUri + " URL was detected. Close the connection?",
            MessageBoxButtons.YesNo);
        e.Cancel = (shouldClose == DialogResult.Yes) ? true : false;
    }
    

    Read the following topic for detailed information and examples: Suppress Control Requests to Download Data from External URLs.

    See Also