很显然我的父页面用来显示数据,子页面用来新怎么数据,那么怎么控制子页面关闭时父页面上的GridView刷新数据?我的子页面是window.showModalDialog弹出的

解决方案 »

  1.   

    很显然我的父页面用来显示数据,子页面用来新增数据,那么怎么控制子页面关闭时父页面上的GridView刷新数据?我的子页面是window.showModalDialog弹出的
      

  2.   

    if( window.showModalDialog("abc.aspx") == "your value"){
    location.reload();
    }
      

  3.   

    我使用的是微软Microsoft ASP.NET AJAX Beta 2,那么怎么在关闭子页面后刷新父页面上的GridView?因为主页面上显示数据是用了UpdatePanel的。来做无刷新的。所以我的目的不是子窗体关闭后造成父页面的整体刷新。
      

  4.   

    那就在window.showModalDialog("abc.aspx") 
    后面调用你的无刷新的程序来刷新这个GridView啊。
      

  5.   

    本身使用了UpdatePanel后是没有必要写刷新代码段的。所以我只有查询代码段
      

  6.   

    我用的是atlas,我直接把弹出模态对话框的按钮设为triger,工作很正常。
      

  7.   

    to netharry() 您能贴出您的代码吗?
      

  8.   

    <atlas:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                           <asp:TreeView ID="folderNameTreeView" runat="server" OnTreeNodePopulate="folderNameTreeView_TreeNodePopulate" ExpandDepth="0" Height="137px" NodeIndent="15"  Width="116px" BorderStyle="None" BorderWidth="5px"  ShowLines="True" OnSelectedNodeChanged="folderNameTreeView_SelectedNodeChanged" >
                               <ParentNodeStyle Font-Bold="False" />
                               
                               <SelectedNodeStyle BackColor="Navy" Font-Underline="False" HorizontalPadding="2px"
                                   VerticalPadding="0px" ForeColor="White" Height="7px" BorderColor="White" BorderWidth="3px" />
                               <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="2px"
                                   NodeSpacing="0px" VerticalPadding="0px" />
                            </asp:TreeView>
                            <asp:HiddenField ID="destinationInforHiddenField" runat="server" EnableViewState="false" OnValueChanged="destinationInforHiddenField_ValueChanged" />
                           </ContentTemplate>
                            <Triggers>
                                <atlas:ControlEventTrigger ControlID="MoveButton" EventName="Click" />
                            </Triggers>
                            </atlas:UpdatePanel>
    ————————————————————————   
    destinationInforHiddenField 是为了获得模态对话框返回的值。
      

  9.   

    补充:点击MoveButton弹出模态对话框。
      

  10.   

    程序在http://www.addtoo.net/Visitor/Move.aspx,不过我还没有上传更新的。应该和你的一样。