Hi all,

I've been using the above control for some time with no problem with it working on a button click event.

However, this time the scenario is slightly different and I need to force the modalpopup to show during the button click event.

When the user presses my button on a form, I show a messagebox. Depending on the answer, I then either drop out of the click event or I continue. If I continue i want my popup to show since this is basically a progress bar.

in the aspx page I have :

Code:
<asp:Content ID="Content1" ContentPlaceHolderID="content" Runat="Server">
<cc1:ModalPopupExtender ID="PopUpdate" runat="server" PopupControlID="UpdateProgress1" TargetControlID="btnFake" BackgroundCssClass="modalBackground"></cc1:ModalPopupExtender>
	
	<script type="text/javascript">
	
	function showScopeGroupPopup()
	{
		$get('<%=UpdateProgress1.ClientID %>').className = "modalpopup";
		$find('<%=PopUpdate.ClientID %>').show();
		return false;
	}
	
</script>
and further down at the end of the UpdatePanel i have

Code:
   </ajax:UpdatePanel>
    <div style="margin-left:95%;"><asp:Button ID="cmdSave" runat="server" Text="Save"/></div>   
    <ajax:UpdateProgress ID="UpdateProgress1"  runat="server" AssociatedUpdatePanelID="AjaxUpdate" DynamicLayout="true" DisplayAfter="0">
        <ProgressTemplate>
            <asp:Panel ID="UpdateProgressPanel" runat="server" Height="154px" Width="154px" BackColor="White" BorderStyle="Solid" HorizontalAlign="center">
                <center><asp:Image ImageUrl="~/App_Themes/Standard/images/BigAjaxWait.gif" runat="server" ID="imgProgress1" />
                <p /><b>Refreshing, please wait...</b></center>
            </asp:Panel>
        </ProgressTemplate>
    </ajax:UpdateProgress>
If I place cmdSave inside the updatepanel, my popup shows as soon as the button is clicked and I do not get my messagebox first. so I've placed it outside the updatepanel.

In Code assuming the user said yes to the messagebox, I have

Code:
            PopUpdate.Show()
but because it's still in the event and no postback has happened the popup does not show and instead my code continues on through.