WebClient.UploadStringCompleted イベント


非同期の文字列アップロード操作の完了時に発生します。Occurs when an asynchronous string-upload operation completes.

 event System::Net::UploadStringCompletedEventHandler ^ UploadStringCompleted;
public event System.Net.UploadStringCompletedEventHandler? UploadStringCompleted;
public event System.Net.UploadStringCompletedEventHandler UploadStringCompleted;
member this.UploadStringCompleted : System.Net.UploadStringCompletedEventHandler 
Public Custom Event UploadStringCompleted As UploadStringCompletedEventHandler 
Public Event UploadStringCompleted As UploadStringCompletedEventHandler 



次のコード例は、このイベントのイベントハンドラーを設定する方法を示しています。The following code example demonstrates setting an event handler for this event.

void UploadStringInBackground2( String^ address )
   WebClient^ client = gcnew WebClient;
   Uri ^uri = gcnew Uri(address);
   String^ data = "Time = 12:00am temperature = 50";

   client->UploadStringCompleted += gcnew UploadStringCompletedEventHandler( UploadStringCallback2 );
   client->UploadStringAsync( uri, data );
public static void UploadStringInBackground2(string address)
    WebClient client = new WebClient();
    Uri uri = new Uri(address);
    string data = "Time = 12:00am temperature = 50";
    client.UploadStringCompleted += new UploadStringCompletedEventHandler(UploadStringCallback2);
    client.UploadStringAsync(uri, data);
Public Shared Sub UploadStringInBackground2(ByVal address As String)

    Dim client As WebClient = New WebClient()
    Dim data As String = "Time = 12:00am temperature = 50"
    AddHandler client.UploadStringCompleted, AddressOf UploadStringCallback2
                Dim uri as Uri = New Uri(address)
    client.UploadStringAsync(uri, data)
End Sub


このイベントは、非同期文字列のアップロード操作が完了するたびに発生します。This event is raised each time an asynchronous string upload operation completes. 非同期文字列のアップロードは、メソッドを呼び出すことによって開始され UploadStringAsync ます。Asynchronous string uploads are started by calling the UploadStringAsync methods.

は、 UploadStringCompletedEventHandler このイベントのデリゲートです。The UploadStringCompletedEventHandler is the delegate for this event. クラスは、イベント UploadStringCompletedEventArgs データを含むイベントハンドラーを提供します。The UploadStringCompletedEventArgs class provides the event handler with event data.

イベントを処理する方法の詳細については、次を参照してください。処理とイベントの発生します。For more information about how to handle events, see Handling and Raising Events.