我收到了这段代码:
private void LoadXML()
{
WebClient myWebClient = new WebClient();
myWebClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(myWebClient_DownloadStringCompleted);
myWebClient.DownloadStringAsync(new Uri(strXMLPath));
}
private void myWebClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
//Do stuff
}
myWebClient_DownloadStringCompleted
仅在我第一次拨打LoadXML()
时被解雇。我试图获取的xml文件没有错误,所以我应该期待一个结果。我错过了什么?
答案 0 :(得分:0)
我设法将问题缩小了。我在asp:updatepanel
内部有一个silverlight对象,当我将silverlight对象移到更新面板之外时,事情开始起作用了。