弹出窗口打开页面底部

时间:2014-01-29 11:20:56

标签: javascript asp.net vb.net

我的页面上有一个按钮,点击它时会显示错误列表,如果有的话。

但是,如果点击此按钮后我想删除另一个按钮上的记录,则该按钮会在页面底部打开一个弹出窗口,但显示不正常。

应该使屏幕变钝并在屏幕中间显示弹出窗口。

下面是第一个按钮的代码,如果需要,我将提供asp。

Sub DisplayErrors()
    Dim i As Integer = 0
    If error_array Is Nothing Then
        'Response.Redirect("GlobalDBRoutine.aspx?text=" + QuoteNolbl.Text)
    Else
        'For i = 0 To error_array.Length - 1
        '    Dim Trow As New TableRow
        '    Dim Tcell As New TableCell()
        '    Tcell.Text = error_array(i).ToString
        '    Trow.Cells.Add(Tcell)
        '    Table2.Rows.Add(Trow)
        'Next
        Dim Newerror_array() = error_array.Distinct.ToArray
        For i = 0 To Newerror_array.Length - 1
            Dim Trow As New TableRow
            Dim Tcell As New TableCell()
            Tcell.Text = Newerror_array(i).ToString
            Trow.Cells.Add(Tcell)
            Table2.Rows.Add(Trow)
        Next
        MessageBox.Show(" There is a problem in estimation !!! Have a look at the bottom of the page to see if it says anything if not contact IT.")
    End If
End Sub

这是删除按钮以及我正在使用的modalpopup扩展器。

按钮:

            <asp:Button ID="cmdDelete" runat="server" Text="Delete" Width="80px" CssClass="ProdPlusCom"
                OnClientClick="Javascript:ShowPopup('DeletePopup'); " />
            <asp:ModalPopupExtender ID="cmdDelete_ModalPopupExtender" runat="server" DynamicServicePath=""
                Enabled="True" TargetControlID="cmdDelete" BackgroundCssClass="modalBackground"
                CancelControlID="cmdCancel" PopupControlID="DeletePopup">
            </asp:ModalPopupExtender>

弹出窗口:

<div id="DeletePopup" class="modalPopup" style="font-family: Verdana; font-size: 10pt;
    width: 200px; height: auto; visibility: hidden">
    <asp:Label ID="lblWarn" runat="server" Text="Are You sure you want to delete this specification?"></asp:Label><br />
    <br />
    <asp:Button ID="cmdCommit" runat="server" CssClass="ProdPlusCom" Text="Ok" />
    <asp:Button ID="cmdCancel" runat="server" CssClass="ProdPlusCom" Text="Cancel" />
</div>

1 个答案:

答案 0 :(得分:0)

  

可能是css的错误。发布modalPopup的css

假设您要确认用户删除。您也可以使用ajax确认按钮扩展器。 ModalPopup也是正确的,但要确保你给出了ModalPopu的CSS [