Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.