从IFRAME asp.net刷新基页 [英] asp.net Refresh base page from iframe
本文介绍了从IFRAME asp.net刷新基页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个内部的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>");
这篇关于从IFRAME asp.net刷新基页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文