WebClient.UploadStringCompleted WebClient.UploadStringCompleted WebClient.UploadStringCompleted WebClient.UploadStringCompleted Event

정의

비동기 문자열 업로드 작업이 완료되면 발생합니다.Occurs when an asynchronous string-upload operation completes.

public:
 event System::Net::UploadStringCompletedEventHandler ^ UploadStringCompleted;
public event System.Net.UploadStringCompletedEventHandler UploadStringCompleted;
member this.UploadStringCompleted : System.Net.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.

적용 대상