2014-01-29 50 views
0

我在页面上有一个按钮,当它被点击时,它显示一个关闭错误的列表(如果有的话)。Popup在页面底部打开

但是,如果在此按钮单击后,我想要删除另一个按钮上的记录单击,该按钮会在页面底部打开一个弹出框,并且不会显示为正常。

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

下面是第一个按钮的代码,如果需要,我也会提供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> 
+2

'MessageBox.Show'? –

回答

0

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

假设您想确认从用户删除。您也可以使用ajax确认按钮扩展程序。 ModalPopup也是正确的,但要确保你在asp.net中给出了ModalPopu的css [

+0

CSS与我用于其他所有弹出式扩展程序的CSS相同。所以我知道这没有问题......我认为唯一的问题可能是它已经做出了改变,并没有回复。 – GeoffWilson