Here is a very simple code to display an Javascript alert from Silverlight code behind.
Silverlight Code behind C#:
JavaScript:
Silverlight Code behind C#:
private void Button_Click(object sender, RoutedEventArgs e) { HtmlPage.Window.Invoke("showAlert", "Hello!"); }
JavaScript:
function showAlert(message)
{
alert(message);
}
No comments:
Post a Comment