hello friends i have one code which is as follows :
for (int i = 1; i < 6; i++) { int j = 0; Nos[j++] = Config[i]; var xmladd = "uri to download data"; WebClient _proxy2 = new WebClient(); _proxy2.DownloadStringCompleted += new DownloadStringCompletedEventHandler(DownloadStringCompleted); _proxy2.DownloadStringAsync(new Uri(xmladd)); string msg = Config[11] + ":" + Config[12] + " .My Current Location is " + Properties.address + " , Latitude : " + clslatlong.ReturnLat() + " , Longitude : " + clslatlong.ReturnLongi(); } here problem is that completed event is not fired immedietely and keep on executing the further code but my next code is based on the result returned by the completed event what should be done in this kinda situation ? my code should wait to get the response from completed event and then proceed further please help.
DownloadStringCompletedevent handler... Why can't you use that to create yourstring msgusing yourProperties.address, etc?