title: ASP.NET ModalPopupExtender appears when calling Alert JavaScript function
body: <p>I'm facing a buggy behavior from ASP.NET Ajax Controls Toolkit ModalPopupExtender, when I call <code>Alert()</code> JavaScript function from server-side the modal appears in the back ground. I don't know why this is happens.</p>
  
  <p>here is the code:</p>
  
  <p>vb:</p>
  
  <pre><code>Sub ShowAlert(ByVal message As String)
      ScriptManager.RegisterStartupScript(Me.UpdatePanel, UpdatePanel.GetType(), "notificationScript", "&lt;script language='JavaScript'&gt; alert('" &amp; message &amp; "'); &lt;/script&gt;", False)
  End Sub
  </code></pre>
  
  <p>aspx:</p>
  
  <pre><code>&lt;asp:UpdatePanel ID="UpdatePanel" runat="server"&gt;
    &lt;ContentTemplate&gt;
        &lt;asp:Panel ID="pnlPartialInstructions" CssClass="modal" runat="server"&gt;
           ......
        &lt;asp:Panel ID="pnlPrintConfirmation" CssClass="modal" runat="server"&gt;
            &lt;table class="ui-accordion"&gt;
                &lt;tr&gt;
                    &lt;td colspan="2"&gt;
                        &lt;asp:Label Text="Do you want to print the receipt?" ID="lblPrintConfirmation" runat="server"
                            meta:resourcekey="lblPrintConfirmationResource1" Font-Bold="True" Font-Names="tahoma"
                            Font-Size="Large" /&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;
                        &lt;asp:Button ID="btnConfirmPrint" Text="Yes" CssClass="google-button google-button-blue"
                            runat="server" meta:resourcekey="btnConfirmSaveResource1" Font-Size="Large" /&gt;
                    &lt;/td&gt;
                    &lt;td&gt;
                        &lt;asp:Button ID="btnCancelPrint" Text="No" CssClass="google-button google-button-red"
                            runat="server" meta:resourcekey="btnCancelSaveResource1" Font-Size="Large" /&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/asp:Panel&gt;
        &lt;asp:Button ID="HiddenForModel1" Text="" runat="server" CssClass="hide" CausesValidation="False" /&gt;
        &lt;ajaxToolkit:ModalPopupExtender ID="pnlPrintConfirmation_ModalPopupExtender" runat="server" DynamicServicePath=""
            Enabled="True" TargetControlID="HiddenForModel1" PopupControlID="pnlPrintConfirmation"
            BackgroundCssClass="ModalBackground" DropShadow="True" CancelControlID="btnCancelPrint"
            RepositionMode="RepositionOnWindowResizeAndScroll"&gt;
        &lt;/ajaxToolkit:ModalPopupExtender&gt;
  
        .....
        &lt;/asp:UpdatePanel&gt;
    &lt;/ContentTemplate&gt;
  </code></pre>