title: Check if IsCallback on Application_BeginRequest
body: <p>I have a web application (.NET 3.5) that has this code in Global.asax:</p>
  
  <pre><code>Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
      LinkLoader()
      PathRewriter()
      PathAppender()
  End Sub
  </code></pre>
  
  <p>I want all those functions inside to get called except for when it's an AJAX call back. So, ideally I would have it changed to:</p>
  
  <pre><code>Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
      If not Page.IsCallback then
          LinkLoader()
          PathRewriter()
          PathAppender()
      End If
  End Sub
  </code></pre>
  
  <p>But there is not access to the page object here. So, basically my question is:</p>
  
  <p>How do I check if the request is an AJAX call back inside Application_BeginRequest?</p>
  
  <p>Thank you very much for any feedback.</p>