I have a button on my page that, when clicked, displays a list of errors, if any.
However, if I click another button to delete a record after clicking the first button, a popup appears at the bottom of the page instead of in the middle as expected.
The intended behavior is to dim the screen and show the popup in the center of the screen.
Below is the code for the first button, and I can provide the ASP code if needed.
Sub DisplayErrors()
Dim i As Integer = 0
If error_array Is Nothing Then
'Response.Redirect("GlobalDBRoutine.aspx?text=" + QuoteNolbl.Text)
Else
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
This is the Delete button along with the modalpopup extender that I am using.
Button :
<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>
Popup :
<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>