Hello i am developing application for windows phone and i want to read an xml from the web
so i am using on page loaded event :
Dim cl As New WebClient
AddHandler cl.DownloadStringCompleted, AddressOf cl_DownloadStringCompleted
cl.DownloadStringAsync(New Uri("demo.com/1.xml",UriKind.RelativeOrAbsolute))
and on cl.DownloadStringCompleted event :
Dim doc = XDocument.Load("demo.com/1.xml")
but for some reason i crashes !
the bug must be that i have not to use URI : “demo.com/1.xml” , but some else :S
The
DownloadStringCompletedevent hasDownloadStringCompletedEventArgs. You should use the Result property of those args.and the handler: