0

我有这个弹出窗口

<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>

这个按钮:

<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>

但现在它总是在上面......谢谢!

4

1 回答 1

0

更改 javascript 以便返回 false 而不是回发。

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

其次改变你称之为的方式:

<dxe:ASPxButton id="_ShowM" ... ClientSideEvents-Click="return ShowPopup();" ...>
于 2012-04-18T08:32:53.927 回答