I'm trying to create a simple informational message popup to tell the users errors or other simple messages. I've looked out on the web for code behind functionality of the modalpopup and I added the dummy button and put it all into an update panel to get it to "work", but it doesn't.
Here's my html:
<asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate><asp:Button ID="DummyButton" runat="server" Style="display: none" /><asp:ModalPopupExtender ID="Button1_ModalPopupExtender" runat="server" PopupControlID="pnlPopupWindow"
DynamicServicePath="" Enabled="True" TargetControlID="DummyButton" CancelControlID="OKButton"
Drag="True" DropShadow="True"></asp:ModalPopupExtender><asp:Panel ID="pnlPopupWindow" runat="server" Style="display: none" BackColor="#E6E6E6"
BorderStyle="Groove" CssClass="modalPopup"><br /><asp:Label ID="lbMessageBox" runat="server"></asp:Label><asp:Panel ID="Panel2" runat="server" HorizontalAlign="Center"><br /><asp:Button ID="OKButton" runat="server" Text="OK" /></asp:Panel></asp:Panel><ajaxToolkit:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID="pnlPopupWindow"></ajaxToolkit:RoundedCornersExtender></ContentTemplate></asp:UpdatePanel>And here's my code behind:
lbMessageBox.Text = "The Number of Devices indicated above do not match those entered on the detail list."
Button1_ModalPopupExtender.Show()When I debug it, the code triggers, but the modelpopup doesn't show. The screen will refresh, but no popup will show.