Silverlight XAML Primer 10, Listing 2

Creating a Silverlight Downloader instance.

function onLoad(control, context, rootElement)
{
   var downloader = control.CreateObject("downloader");
   downloader.AddEventListener("DownloadProgressChanged", 
     onProgressChanged);
   downloader.AddEventListener("Completed", onCompleted);
   downloader.Open("GET", "Files.zip?" + 
     new Date()); // Adding date helps avoid file caching
   downloader.Send();
}
comments powered by Disqus
Most   Popular
Upcoming Events

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.