title: Any way to do a synchronous PageMethods call?
body: <p>I'm trying to do this:</p>
  
  <pre><code>function DelBatch()
  {var userInfo = get_cookie("UserInfo");
  PageMethods.DeleteBatchJSWM(userInfo, function(result)
                                            {window.location = "BatchOperations.aspx";});
  }
  </code></pre>
  
  <p>But it still runs asynchronously. I need the browser to actually wait until my code-behind is finished executing, then it can be refreshed </p>
  
  <p>There's a listbox loaded with values that were just deleted from the database, they shouldn't be visible. Problem I have is the window location refreshes before the code-behind is executed, and nothing seems like it was deleted to the user.</p>