I have an ASP.NET 3.5 WebForm that leverages the frameworks Page.ClientScript.GetCallbackEventReference() method and I'd like some of the calls to be synchronous.

Now, the documentation says that the 5th parameter (see below) controls this. Specifically, when you pass 'false' it's supposed to be a non-asynchronous call. However, regardless if it's true or false, it still processes the call asynchronously.

Page.ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "context",false);

Is there a work-around for this or perhaps I'm doing something wrong? Thanks in advance for the assistance!

+1  A: 

Why not use a standard postback? I'm not sure why passing false in the last parameter isn't doing what the documentation says, or even why you would want to do that, since it would be simply posting back.

Also, why not use ASP.NET AJAX instead of the ICallBackEventHandler interface?

Kyle Trauberman
I'd prefer not to post back the entire page for a single data point and if it were to run asynchronously there's a risk that the user could invoke another event on the page(i.e. fire a true post back) before that data point was returned.Good suggestion about the ASP.NET AJAX; i'll look into it.