我有一个内部的iframe等asp.net页面的页面。
I have page with other asp.net page inside iframe.
和按钮点击里面的iframe,我需要从服务器端刷新主页。
And on button click inside iframe i need to refresh main page from server side.
怎么了?
请使用javascript,你可以很容易地做到这一点。
Make use of javascript and you can easily do it
调用下面的函数上的按钮,点击
call the following function on your button click
<script language="javascript">
function RefreshParent()
{
window.parent.location.href = window.parent.location.href;
}
</script>
从CS code如果在iframe打开aspx页面
From the cs code if you are opening the aspx page in the iframe
Page.RegisterStartupScript("RefreshParent","<script
language='javascript'>RefreshParent()</script>");