Wednesday, March 26, 2008

Calling a JavaScript function from Silverlight 2 - Laurent Duveau

 

Calling a JavaScript function from Silverlight 2

Wow, this is far better now with SL2! no more tips and tricks.

JavaScript:

<script type="text/javascript">
function DisplayMessage()
{
alert("call me from Silverlight 2");
}
</script>

Silverlight:

using System.Web.Browser;

HtmlPage.Window.CreateInstance("DisplayMessage");

Calling a JavaScript function from Silverlight 2 - Laurent Duveau

1 comment:

Unknown said...

says that cannot find function name? :(