在asp.net的后台代码中刷新iframe,或者js刷新iframe

index.htm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<frameset rows="140,1*" frameborder="no" framespacing="0">
	<frame id="topframe" name="topframe" src="Top.aspx" name="top" scrolling="NO" noresize marginwidth="0" marginheight="0">
	<frameset cols="200,1*" >
		<frame id="treeframe" name="treeframe" src="Tree.aspx" name="nav" scrolling="NO" marginwidth="0" marginheight="0">
		<frame id="bodyframe" name="bodyframe" src="Default.aspx" >
	</frameset>
	<<frame id="bottomframe" title="bottomframe" name="bottomframe" src="Bottom.aspx" nosesize="noresize" scrolling="no">
</frameset>
</html>

我想在Default.aspx中的后台C#代码中能刷新treeframe这个iframe
可以执行如下代码:
Page.ClientScript.RegisterStartupScript(this.GetType(), "treeadd""window.parent.parent.treeframe.location.reload();"true);
 
原文地址:https://www.cnblogs.com/vihone/p/3138953.html