弹出窗口无法显示

Popup can't show

本文关键字:显示 窗口      更新时间:2023-09-26

我有这个弹出窗口:

<dxpc:ASPxPopupControl runat="server" ClientInstanceName="pcMFileBrowser" id="pcMFileBrowser" Modal="false"
HeaderText="Browse M Files" EnableClientSideAPI="True" PopupHorizontalAlign="WindowCenter" 
PopupVerticalAlign="WindowCenter" CloseAction="None" ShowCloseButton="False" EnableAnimation="False">
<ContentCollection>
<dxpc:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
    <table>
        <tr>
            <td>
                TEXT!
            </td>
        </tr>
    </table>
</dxpc:PopupControlContentControl>
</ContentCollection>
</dxpc:ASPxPopupControl>

和这个按钮:

<dxe:ASPxButton id="_ShowM" runat="server" Text="Browse M" Visible="false" skinid="WideButton" autopostback="False" ClientSideEvents-Click="function(s, e){pcMFileBrowser.Show();}" causesvalidation="False" enableclientsideapi="True" wrap="False"></dxe:ASPxButton>

但是当我单击按钮时,它没有显示...我试过

<dxe:ASPxButton id="_ShowM" runat="server" Text="Browse M" Visible="false" skinid="WideButton" autopostback="False" ClientSideEvents-Click="ShowPopup" causesvalidation="False" enableclientsideapi="True" wrap="False"></dxe:ASPxButton>
<script ......> function ShowPopup(s, e){pcMFileBrowser.Show();}</script>

但现在它总是在顶部...

更改 javascript,以便返回 false 并且不进行回发。

<script> 
       function ShowPopup()
       {
         pcMFileBrowser.Show();
         return false;
       }
</script>

第二次更改您将其称为的方式:

<dxe:ASPxButton id="_ShowM" ... ClientSideEvents-Click="return ShowPopup();" ...>