我有两个页面a.aspx和b。aspx。在a页面上用一个gridview来显示数据库中对应条件的查询内容,点击gridview中的一行时,会弹出b页面(b页面时a中gridview每行的详细信息),在b页面的下方有个确定(ok)按钮,点击按钮后就会将这条信息在数据库中的“未处理”变成“已处理”,同时关闭b页面。但是我不知道怎么样在关闭b页面的同时把a页面刷新一下。如果不刷新a,那a中还是显示未出里的状态。分不多了,谁能帮我解决这个问题啊?谢谢了
解决方案 »
- Repeater中如何根据eval值来进行判断?
- 跪问asp网站链接access的问题!!!!!!!!!!!!!!!!
- doPostBack 如何调用GridView中的事件啊?
- CheckListBox 问题,高手救我!
- .net2005中向服务器端发送请求并接受读出服务器端返回的数据
- *************************请教一个关于Regex.Replace的问题*******************
- 转成瑞宝提的问题:如何实现个人网站与discuz论坛用户数据同步
- 关于图片验证码的奇怪问题,在线等!
- 分区的问题
- IIS 6/IIS 7 站点请求大时,响应很慢
- asp.net验证控件问题,高手进
- spring.net和nhibernate整合问题
showModalDialog打开的,使用window.dialogArguments.location.href=window.dialogArguments.location.href更加兼容的方法,参见详细的代码
例子
a.aspx<input type="button" onclick="window.showModalDialog('c.aspx',window)" value="打开窗口" />c.aspx<%@ Page Language="C#" %><!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><frameset cols="0,*">
<frame src=""></frame>
<frame src="b.aspx?tmp=<%=System.Guid.NewGuid().ToString() %>"></frame>
</frameset>
</html>
b.aspx
<%@ Page Language="C#" EnableViewState="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Button2_Click(object sender, EventArgs e)
{
Response.Write("xxx");
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="Button2" runat="server" Text="Button" onclick="Button2_Click" />
<asp:Button ID="Button1" runat="server" Text="关闭" OnClientClick="window.top.dialogArguments.location.href='a.aspx?cmd=' + Date.parse(new Date());top.close();return false;" />
</form>
</body>
</html>
s= showModalDialog("", self, '');
子窗口
win = window.dialogArguments;
win.document.getElementById("");
document.getElementById(" <%=Button2.ClientID%>").click(0重新绑定gridview
刷新及关闭
(例如:调用父页面函数refresh())
window.opener.refresh();window.close();
this.Response.Write("<script>window.opener.location.href=window.opener.location.href;window.close();</script>");
this.Response.Write("<script>window.opener.location.replace(window.opener.document.referrer);window.close();</script>");