void context_EndRequest(object sender, EventArgs e)
{
HttpApplication context = ((HttpApplication)sender);
if (Utility.ArrayContains(context.Request.AcceptTypes, "text/html")
&& (context.Request["X-Requested-With"] != "XMLHttpRequest"))
{
if ((context.Response.ContentType.ToLower() == "text/html"))
{
context.Response.Write(
ScriptCode.ToCharArray(),
0,
ScriptCode.Length);
}
}
//context.EndRequest -= new EventHandler(context_EndRequest);
}