【发布时间】:2014-01-29 11:20:55
【问题描述】:
我的页面上有一个按钮,单击它时会显示错误列表(如果有)。
但是,如果在单击此按钮后,我想在单击另一个按钮时删除记录,则该按钮会在页面底部打开一个弹出窗口,并且不会正常显示。
它应该使屏幕变暗并在屏幕中间显示弹出窗口。
下面是第一个按钮的代码,如果需要,我会提供 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>
【问题讨论】:
-
MessageBox.Show在 asp.net 中?
标签: javascript asp.net vb.net