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'm having a a issue related to Sharepoint/ASP.Net Postbacks.

Basically, what's happening is I have the following GridView on my page:

    EnableViewState="false" runat="server" 
     EnablePersistedSelection="true" EnableSortingAndPagingCallbacks="true">

Everything in the gridview works as it should. The problem is to do with the Paging controls. My Gridview has a SharePoint:MenuItemTemplate which opens a Modal Popup when you click to Edit an Item. The popup works fine.

Ever since i've gone and implemented Sorting on the Gridview the following happens:

  1. Clicking on a Column to sort by the column works fine.
  2. Next, clicking on the Menu and selecting edit opens up a Modal Popup.
  3. Clicking on a Save button inside the modal shows the Internet explorer message : "To display the web page again, the web browser needs to resend... " with the Retry, Cancel buttons. How can I avoid the double postback?
share|improve this question
how are you binding grid? – Prashant Lakhlani Apr 10 '13 at 11:58

Ok, I figured it out. When refreshing a page after a modal is closed, do not use window.location.reload() Rather use window.location.href=window.location.href

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.