views:

130

answers:

1

Hi,

I've successfully implemented a Javascript call from Silverlight (i'm calling a java applet). When the user finishes using the applet, I'd like to send the data back to Silverlight; so I've created a callback function:

    [ScriptableMember]
    public void DoCallback(string svalue)
    {
        MessageBox.Show(s, "Value from Applet:", MessageBoxButton.OK);
    }

Everything works fine, until the DoCallback() function ends - here for some reason the whole Silverlight application shuts down, and App.xaml.cs loads up from the beginning.

The function is implemented in a sub-View: ~/View/Applet.xaml. I guess somehow the application don't get the /#/Applet parameter for the URI, that's why it forces a full reload..

A: 

...never use the html button instead of input[@type="button"] in a Silverlight project, because it will always submit like input[@type="submit"].

balint