On Jul 24, 2012, at 7:28 AM, Nosh <port...@hotmail.co.uk> wrote: > I am using async to get message back from web service and in the methos > dealing with the returned msg from the web service i need to show a message. > I realise due to thread i cannot update UI.
As JLee mentioned, you can use Activity.RunOnUiThread(). > private void ServerReturned(IAsyncResult ar) > { > try > { > JobTrackerWS.JobTracker testConn = > (JobTrackerWS.JobTracker)ar.AsyncState; > string AsyncRetVal = testConn.EndTestConnection(ar); > if (AsyncRetVal == "OK") > { > Toast.MakeText(this, "Connection Successful", > ToastLength.Long).Show(); this.RunOnUiThread(() => { Toast.MakeText(this, "Connection Successful", ToastLength.Long).Show(); }); Assuming that `this` is an Activity. - Jon _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid