<p>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.  </p>

<p>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.  </p>

<pre><code>Page.ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "context",false);
</code></pre>

<p>Is there a work-around for this or perhaps I'm doing something wrong?  </p>

ASPX Page
```
```
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="How-to-use-GetCallbackEventReference.aspx.vb" Inherits="How_to_use_Callback" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>How to use GetCallbackEventReference</title>
        <script type="text/javascript">
            function GetNumber() {
                UseCallback();
            }
            function GetRandomNumberFromServer(txtGetNumber, context) {
                document.forms[0].txtGetNumber.value = txtGetNumber
            }
        </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input id="Button1" type="button" value="Get Random Number" onclick="GetNumber()" /><br /><br />
        <asp:TextBox ID="txtGetNumber" runat="server"></asp:TextBox>&nbsp;</div>
    </form>
</body>
</html>
```
```
Code Behind
```
```
Partial Class How_to_use_Callback
    Inherits System.Web.UI.Page
    Implements System.Web.UI.ICallbackEventHandler
    Dim CallbackResult As String = Nothing
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim cbReference As String = Page.ClientScript.GetCallbackEventReference(Me, "arg", "GetRandomNumberFromServer", "context")
        Dim cbScript As String = "function UseCallback(arg,context)" & "{" & cbReference & " ; " & "}"
        Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "UseCallback", cbScript, True)
    End Sub

    Public Function GetCallbackResult() As String Implements System.Web.UI.ICallbackEventHandler.GetCallbackResult
        Return CallbackResult
    End Function

    Public Sub RaiseCallbackEvent(ByVal eventArgument As String) Implements System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent
        CallbackResult = Rnd().ToString()
    End Sub
End Class
```
```