建议你不要用modaldialog,用window.open打开一个非模式窗体不就简单多了

解决方案 »

  1.   

    关闭之前刷新!
    dialogArguments.location.href=dialogArguments.location.href;
    window.close();
      

  2.   

    <script language="javascript">
    value=window.showModalDialog("DialogForm.aspx");
    WebForm1.submit();
    </script>
      

  3.   

    hgknight(江雨.net) 
    我想做的是在关闭modalDialog的时候刷新下面的那个aspx,这样做可以吗?
      

  4.   

    hgknight(江雨.net) 
    另外你那段代码放到哪里?
      

  5.   

    在页面上加上这个按钮试试,记得替换相应的DialogForm.aspx和WebForm1
    <INPUT type="button" value="Button" onclick=" var value=window.showModalDialog('DialogForm.aspx');alert(value);WebForm1.submit();">
      

  6.   

    还有一个问题啊!我每次点击modalDialog上的提交的时候都会重新开一个和
    modalDialog内容相同的页面,如何处理这个问题?
      

  7.   

    在<head></head>之间加入一行:<base target="_self">
      

  8.   

    问题已经解决。非常感谢 江雨,我还有n个问题,希望你能继续关注。
    <base target="_self">这个东西是什么意思?
      

  9.   

    See Msdn:
    TARGET
    Sets or retrieves the window or frame at which to target content. 
    _self 
    Load the linked document into the window in which the link was clicked (the active window).
      

  10.   

    怎么使得点击一个modalDialog中的控件而调用底层窗口的某一web control button的click呢?
      

  11.   

    <script language="javascript">
    value=window.showModalDialog("DialogForm.aspx", window);
    </script>
    inside DialogForm.aspx:<script language="javascript">
    function window.onunload()
    {
    window.dialogArguments.location.reload(true);
    }
    </script>
      

  12.   

    >>>怎么使得点击一个modalDialog中的控件而调用底层窗口的某一web control button的click呢
    inside DialogForm.aspx:
    <script language="javascript">
    function YourControlID.onclick()
    {
    window.dialogArguments.document.all("SomeButtonID").click();
    }
    </script>
      

  13.   

    谢谢您!您学.net javascript都看什么资料啊?
      

  14.   

    window.opener应该是它的父窗口—————————————————————————————————
    ibeyond.org正在建设中,即将推出WebAnyWhere测试版,敬请关注。
    WebAnyWhere可以将您的顶级域名解析到您的动态ip上去,让您拥有自己的互联网主机。
      

  15.   

    不错的东西,不过www.3322.org提供免费的。我用的就是这个,我的
    ftp://neversaydie.3322.org:8858
      

  16.   

    an example:1. parent.aspx:
    <form runat="server">
    <asp:button id="btn1" runat="server" text="show" />
    <asp:button id="btn2" runat="server" text="open modal dialog" />
    </form>
    <script language="C#" runat="server">
    void Page_Load (Object sender, EventArgs e)
    {
      btn1.Attributes["onclick"] = "javascript:alert('yes! I am clicked!');return false;";
      btn2.Attributes["onclick"] = "javascript:showModalDialog('child.aspx',window);return false;";
    }
    </script>2. child.aspx:
    <form runat="server">
    <asp:button id="YourControlID" text="show" runat="server" />
    </form>
    <script language="javascript">
    <script language="C#" runat="server">
    void Page_Load (Object sender, EventArgs e)
    {
      YourControlID.Attributes["onclick"] = "javascript:window.dialogArguments.document.all('btn1').click();return false;";
    }
    </script>