asp.net网页的iframe的问题
我在网页A里用了iframe控件加了另外一个网页B,B网页里有个按钮,我想按B网页的按钮,网页A也跟着刷新...请问要怎么做...ASP.net高手出来帮帮忙...谢谢...
我在网页A里用了iframe控件加了另外一个网页B,B网页里有个按钮,我想按B网页的按钮,网页A也跟着刷新...请问要怎么做...ASP.net高手出来帮帮忙...谢谢
展开
2个回答
展开全部
网页A(Default3.aspx):
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<!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 runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%=DateTime.Now %>
<iframe id = "jkl" src="Default4.aspx"></iframe>
</div>
</form>
</body>
</html>
网页B(Default4.aspx):
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>
<!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 runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<input id="Button1" type="button" value="button" onclick="top.location.reload(true)"/>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<!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 runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%=DateTime.Now %>
<iframe id = "jkl" src="Default4.aspx"></iframe>
</div>
</form>
</body>
</html>
网页B(Default4.aspx):
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>
<!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 runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<input id="Button1" type="button" value="button" onclick="top.location.reload(true)"/>
</form>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询