【发布时间】:2010-08-04 04:38:53
【问题描述】:
下面是我在 SilverLight 中使用 web servcie 的代码。
private void button1_Click(object sender, RoutedEventArgs e)
{
BasicHttpBinding bind = new BasicHttpBinding();
EndpointAddress endpoint = new EndpointAddress("http://loalhost/Service.asmx");
ServiceSoapClient client = new ServiceSoapClient(bind, endpoint);
client.RunHelloCompleted += new EventHandler<RunHelloCompletedEventArgs>(client_RunQwinCompleted);
client.RunHelloAsync(command);
}
void client_RunHelloCompleted(object sender, RunHelloCompletedEventArgs e)
{
txtProcess.Text=Process(e.Result);
}
我想知道一种方法,在我运行 RunHelloAsync(Command) 之后,我想获得返回的结果而不去 Completed 事件。请给我提意见。谢谢。
【问题讨论】:
-
为什么你不能在完成的活动中做你需要的?
标签: silverlight silverlight-3.0