开发者

.Net RIA Services: Javascript callback forces full reload of the application

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 rea开发者_开发技巧son 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..


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜