title: response write inside global asax
body: <p>this example dosent work for me ,I tried Response.write but I am getting nothing.
  here is the sample 
  (is it also  possiable come up a  pop up window tell the error detail")</p>
  
  <pre><code>protected void Application_Error(object sender, EventArgs e)
  {
        // At this point we have information about the error
        HttpContext ctx = HttpContext.Current;
  
        Exception exception = ctx.Server.GetLastError ();
  
        string errorInfo = 
           "&lt;br&gt;Offending URL: " + ctx.Request.Url.ToString () +
           "&lt;br&gt;Source: " + exception.Source + 
           "&lt;br&gt;Message: " + exception.Message +
           "&lt;br&gt;Stack trace: " + exception.StackTrace;
  
        ctx.Response.Write (errorInfo);
  
  
        ctx.Server.ClearError ();
      }
  </code></pre>