Hey guys,
I'm having an issue with a modal popup extender. What I'm doing is assigning it to a "hidden" button and on the click method of a different button, I'm calling modal.Show(); When the task behind is doing nothing, or small operations, it works just fine. The issue is when I make a call to a stored procedure, it doesn't show the modal at all. What I'm trying to do is prevent user clicks and notify the user that a process is running (ie. they click on a button and it needs a few seconds to pull all the data they requested).
Has anyone run into this before? Or have any tips?
Thanks in advance for any help!
EDIT:
Heres some sample code (as requested):
The .aspx page:
<asp:Button ID="btnStep1Hidden" runat="server" style="visibility: hidden;" />
<asp:Button ID="Step1" Text="Pull ID Cards" OnClick="Step1_Click" UseSubmitBehavior="false" runat="server" CssClass="button_menu" />
<ajax:ModalPopupExtender ID="mpeStep1" runat="server" PopupControlID="panProgress" TargetControlID="btnStep1Hidden" BackgroundCssClass="modalBackground"></ajax:ModalPopupExtender>
The .aspx.cs code:
mpeStep1.Show();
try
{
SqlCommand cmd = APP.DataManager.GetConnection().CreateCommand();
cmd.CommandText = "EXEC [dbo].[sp_Populate_Initial_DataSet_New]" cmd.Connection.Open();
cmd.ExecuteNonQuery();
cmd.Connection.Close();
}
catch
{
//Log, etc here
}
There are no .DataBinds() for that stored procedure. It merely populates a table that other processes will display the data from.