I got this code:
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 is only fired first time I call LoadXML(). There is no errors on the xml file im trying to get, so I should be expecting a result. What am I missing?
I managed to narrow the problem down. I had the silverlight object inside an
asp:updatepanel, when I moved the silverlight object outside the updatepanel, things started to work.