2011-07-19 48 views
0

我想收集發送到我的事件處理程序中的Web服務的內容,這可能嗎?獲取傳入異步調用的值

說我做一個臺異步調用的位置:

proxyLocation.GetLocationZonesBySupplierZoneCodeCompleted += new EventHandler<GetLocationZonesBySupplierZoneCodeCompletedEventArgs>(proxy_GetLocationZonesBySupplierZoneCodeCompleted); 
proxyLocation.GetLocationZonesBySupplierZoneCodeAsync(txtZoneNumber.Text); 

而且我proxy_GetLocationZonesBySupplierZoneCodeCompleted方法中,我想知道什麼是送了過來。 IE(txtZoneNumber.Text)

我不能指望txtZoneNumber.Text在響應返回時與發送時相同。任何方式來完成這個?

回答

2

該事件僅向您顯示該方法的結果。如果您需要通過 的數據,則必須使其成爲異步方法返回的部分內容。

+0

這就是我的想法,我只是不確定是否有什麼我不知道的。 – Hosemeyer