Silverlight 2, you talk nicely to JavaScript

Sign in to queue


talkNicely As some may know, Silverlight 2 has made the shift from being JavaScript to .Net.  But what happens when you still want to make a client-side JavaScript call?

Jeff Blankenburg shows off exactly how to do call JavaScript from Silverlight 2!

Jeff shows off the sample of getting the first 500 primes using JavaScript, he called the function getPrimes().  Then all he had to do in Silverlight's file was this:






Jeff even shows how to get return values too!  If you want to pass in additional parameters, you can do that too.  Head over to MSDN, they have a more detailed breakdown on calling JS from managed code and calling managed code from JS.

Now you two languages play nicely else I'll pull this car over so fast …



The Discussion

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.