使用showModalDialog 父窗体变成空白

tombrues 2009-05-09 11:56:32
DateTime now = DateTime.Now;
string s = now.ToString("yyyyMMddHHmmss ") + now.Millisecond.ToString();
string OutStr = "";
OutStr = OutStr + " <script> ";
OutStr = OutStr + " var winSettings = ' status:no; help: no; resizable: no; center:yes;dialogHeight:300px;dialogWidth:400px';";
OutStr = OutStr + " window.showModalDialog('Check_Add.aspx?time=" + s + "&PermissionID=" + PermissionID + "','', winSettings);";
OutStr = OutStr + " </script>";
RegisterClientScriptBlock("OpenSPLC", OutStr);

执行这些代码的时候,父窗体会变成空白,我看网上都说使用:RegisterClientScriptBlock来执行就可以了,但是我使用了,父窗体还是白色,是不是与版本有关系,我使用的是VS2008 C#
哪位大侠碰到这种情况麻烦告知我,我将不胜感激啊!
...全文
149 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
uncleson88 2009-05-10
  • 打赏
  • 举报
回复
指定Parent=this
JackLeiMM 2009-05-10
  • 打赏
  • 举报
回复

Page.RegisterClientScriptBlock("js", "<script>parent.frames('Iframe1').location.href='aaaa.aspx';</script>");
xufzu123 2009-05-10
  • 打赏
  • 举报
回复
用个线程试试~~如果你主线程执行耗时的方法界面可能会假死掉~~
热学沸腾56 2009-05-10
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 oec2003 的回复:]
使用Page.RegisterStartupScript
[/Quote]up
oec2003 2009-05-10
  • 打赏
  • 举报
回复
使用Page.RegisterStartupScript
sayoath 2009-05-10
  • 打赏
  • 举报
回复

//可以前台調用。。也不會白屏
//把你的RegisterClientScriptBlock換成這個
//Page.RegisterStartupScript("OpenSPLC", OutStr);

110,536

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧