(X) Hide this Upcoming webinar by Brian Noyes: Querying and Updating Data From Silverlight Clients with WCF RIA Services. February 2nd, 10 am PST (see your local time)
Full webinar info | Register | Read WCF RIA Services Article series by Brian Noyes
Become a member to receive all webinar news by email, or follow all webinar news on Twitter | Facebook | LinkedIn
Skip Navigation LinksHome / Tips / View Tip

Tip: How to invoke a JavaScript function from the Silverlight?

+ Add to SilverlightShow Favorites
0 comments   /   posted by Martin Mihaylov on Sep 09, 2008
(1 votes)
Categories: General

In order to invoke a JavaScript function  we must access the DOM from the Silverlight application. This can be done with the help of the System.Windows.Browser.HtmlPage class. Here it is how it's done:

HtmlPage.Window.Invoke( "Function_Name", new object[] { //Array of paramaters that must be passed to the function } );

We call the Invoke method of the Window property, which takes the name of the function and an array of its arguments as parameters.

That's it!

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 8 and 4 and type the answer here: