asp.net模态子窗口点击BOTTON之后会自动关闭怎么办

<scripttype="text/javascript">functionwinClose()window.clo();window.dialogArguments.l... <script type="text/javascript">function winClose() window.clo();window.dialogArguments.location.reload() }</script>
<body onunload="winClose()" class="body" style="margin:0 auto; width:500px;height:190px" >这是子窗口刷新父窗口代码;
protected void BtnHadDef_Click(object sender, EventArgs e)
{按牛事件
string s1 =
"insert into Defects ([DevID],[DefDesc],[DefHapTime]) values ('"+Request.QueryString["DevID"].ToString()+"','"+this.TxtDefDesc.Text+"','"+this.TxtDefHapTime.Text+"')";
AllClass.saveData(s1);
string s2 = "update Devices set [DevState]='不正常' where DevID='"+Request.QueryString["DevID"].ToString()+"'";
AllClass.saveData(s2);
展开
 我来答
清影漂泊
2012-11-15 · TA获得超过1327个赞
知道大有可为答主
回答量:3393
采纳率:100%
帮助的人:2037万
展开全部
先在模式窗口的<head></head>里加上<base target="_self"/>
更多追问追答
追问
加了
追答
function winClose() window.clo();window.dialogArguments.location.reload() }

这个方法也写的不对。window.close();
花语尘埃
2012-11-15 · TA获得超过170个赞
知道小有建树答主
回答量:503
采纳率:75%
帮助的人:237万
展开全部
有代码吗?贴出来看看,嘿嘿,可以百度hi上帮你解决咯
追问
贴出来了
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式