﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-关注IT新动向</title><link>http://www.cnitblog.com/zebra/</link><description>探讨ASP.NET</description><language>zh-cn</language><lastBuildDate>Mon, 04 May 2026 22:27:05 GMT</lastBuildDate><pubDate>Mon, 04 May 2026 22:27:05 GMT</pubDate><ttl>60</ttl><item><title>showModalDialog弹出对话框刷新父页面问题</title><link>http://www.cnitblog.com/zebra/archive/2007/12/11/37591.html</link><dc:creator>zebra</dc:creator><author>zebra</author><pubDate>Tue, 11 Dec 2007 11:44:00 GMT</pubDate><guid>http://www.cnitblog.com/zebra/archive/2007/12/11/37591.html</guid><wfw:comment>http://www.cnitblog.com/zebra/comments/37591.html</wfw:comment><comments>http://www.cnitblog.com/zebra/archive/2007/12/11/37591.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/zebra/comments/commentRss/37591.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/zebra/services/trackbacks/37591.html</trackback:ping><description><![CDATA[&nbsp;&lt;asp:button &nbsp; id="BtnSelEmployee" &nbsp; runat="server" &nbsp; Text="选择部门员工"&gt;&lt;/asp:button&gt; &nbsp; <br>&nbsp; pageLoad事件里注册脚本: &nbsp; <br>&nbsp; ------------------------- &nbsp; <br>&nbsp; if(!IsPostBack) &nbsp; <br>&nbsp; { &nbsp; <br>&nbsp; //不提交到服务器端 &nbsp; <br>&nbsp; BtnSelEmployee.Attributes.Add("onclick","return &nbsp; checkParent();return &nbsp; false"); &nbsp; <br>&nbsp; &nbsp; <br>&nbsp; StringBuilder &nbsp; build &nbsp; = &nbsp; new &nbsp; StringBuilder(); &nbsp; <br>&nbsp; build.Append("function &nbsp; checkParent(){\n"); &nbsp; <br>&nbsp; build.Append("if(document.getElementById(\"TxtParentID\").value.length &nbsp; == &nbsp; 0){\n"); &nbsp; <br>&nbsp; build.Append("alert(\"请选择要设置的部门!\");\n"); &nbsp; <br>&nbsp; build.Append("return &nbsp; false;}\n"); &nbsp; <br>&nbsp; build.Append("var &nbsp; win &nbsp; = &nbsp; &nbsp; <br>&nbsp; &nbsp; <br>&nbsp; showModalDialog('SetDeptEmployee.aspx?id='+document.getElementById('TxtParentID').value,window,'status:false;dialogWidth:600p &nbsp; <br>&nbsp; &nbsp; <br>&nbsp; x;dialogHeight:500px');\n"); &nbsp; <br>&nbsp; build.Append("if &nbsp; (win &nbsp; != &nbsp; null) &nbsp; window.location.reload();\n"); &nbsp; <br>&nbsp; build.Append("return &nbsp; false;\n"); &nbsp; <br>&nbsp; build.Append("}\n"); &nbsp; <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RegisterClientScriptBlock("selDept",build.ToString()); &nbsp; <br>&nbsp; &nbsp; <br>&nbsp; }&nbsp;&nbsp; <br>
<img src ="http://www.cnitblog.com/zebra/aggbug/37591.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/zebra/" target="_blank">zebra</a> 2007-12-11 19:44 <a href="http://www.cnitblog.com/zebra/archive/2007/12/11/37591.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>