SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to use a modal dialogue..Below is the scenario

<script type="text/javascript">
function OnClicked() {
var waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose("Retrieving Information", "Please wait while the information is being gathered. This may take some time.", 80, 300);

I have this java script function and then on the button click

<asp:Button ID="btnGetSoftwareList" runat="server" OnClientClick="OnClicked()" OnCommand="SoftwareList_Click" Text="Retrieve Software List" />

So on client click it opens the modal and then goes to the server side code and then it also closes it automatically when the button code is complete..The problem is that after the button is pressed it takes some time to reach the code behind button click event. Can i control this in some way.

share|improve this question

Are you sure that it is not just the execution of the code you call in your click event that takes this long to execute?

To debug this issue open up an instance of the Developer Dashboard and look at where the time is spent on the page.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.