Imports System.Web.SessionState

Public Class Global_asax
    Inherits System.Web.HttpApplication

    Public UploadFile01 As String = ""

    Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)

        If My.Settings.IsTestDB = "True" Then
            Logic.Database.IsTestDB = True
            Logic.Database.ConnectionString = Logic.Database.CSTest
        Else
            Logic.Database.IsTestDB = False
            Logic.Database.ConnectionString = Logic.Database.CSLive
        End If



        ' ASP.Net detects that we need jQuery, so it automatically includes the wrong version in the wrong place.
        ' This code makes it insert an empty JavaScript file.  Now we can manually include jQuery without conflicts.
        Dim dummy As New ScriptResourceDefinition() With {.Path = "data:text/html,"}
        ScriptManager.ScriptResourceMapping.AddDefinition("jquery", dummy)

    End Sub

    Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires when an error occurs
    End Sub

End Class