2012-07-20 58 views
1

我知道有一些方法刷新浏览器页面从silverlight 像HtmlPage.Window.Navigate(HtmlPage.Document.DocumentUri); OR System.Windows.Browser.HtmlPage.Document.Submit(); 当容器页面使用页面中的总空间 时,这些工作正常,但是当我的Silverlight应用位于属于某种母版页的子页面上时,该怎么办?即在代码下面我有一个名为Application.aspx的页面,它有三个部分(main.aspx是我的silvelight应用程序所在的位置)。如何刷新从浏览器的Silverlight应用程序位于儿童aspx页

<frameset > 
    <frame id=frameTitle name=frameTitle src="title.aspx" noResize scrolling="no" frameborder="no" height="75" /> 
    <frame name="frameSpacer" id="frameSpacer" src="spacer.aspx" noresize scrolling="no" marginwidth="0" marginheight="0"/> 
    <frame id="frameMain" name="frameMain" src="main.aspx" noResize scrolling=no frameborder="no" /> 
</frameset> 

我怎么能刷新Application.aspx并不仅仅是Main.aspx(当我使用Document.Submit()我得到了main.aspx部分刷新)?使用其他方法?

预先感谢您。

回答

2

解决方案:从容器aspx页面,我们需要添加一个js函数:

function reload() { 
     window.parent.location.reload(true); 
    } 

Silverlight的:我们需要添加一个调用的js函数“重载”

HtmlPage.Window.Invoke("reload"); 
+0

了稍有不同的问题,但这个解决了它+1 – tsiorn 2013-08-22 18:03:18

+0

很高兴帮助你 – Rolando 2013-08-23 23:01:27