> LXFramework.oRequest = Request > LXFramework.oResponse = Response >>
<%@ Application Language="VB" %> <object id="LXFrameworkGlobal" runat="server" class="Framework.Framework.App" scope="Application" /> <script runat=server> Private LXFramework As Framework.Framework.App = LXFrameworkGlobal Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) LXFrameworkGlobal.nApplicationMode = 3 LXFrameworkGlobal.oServer = Server LXFrameworkGlobal.Initialize() End Sub Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs) LXFramework.oRequest = Request LXFramework.oResponse = Response LXFramework.oServer = Server LXFramework.BeginRequest() End Sub Sub Application_EndRequest(ByVal sender As Object, ByVal e As EventArgs) LXFramework.EndRequest() LXFramework.oResponse.Write(LXFramework.GetJavascriptMessage) End Sub Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) LXFramework.ErrorSetup() End Sub Sub Application_PreRequestHandlerExecute(ByVal sender As Object, ByVal e As EventArgs) Dim loContext As Object = Context.Handler Dim loType As Object = loContext.GetType() Dim lcType As String = loType.ToString ' .vb and .config not accepted If lcType = "System.Web.HttpForbiddenHandler" Then Response.Redirect("Default.aspx") End If Dim loPage As System.Web.UI.Page = Context.Handler LXFramework.oPage = loPage End Sub </script>Basically, on the first hit a global application object is now instantiated under the name LXFrameworkGlobal. Also, on the first hit, the event Application_Start() will make use of it.