Imports System.Web.SessionState
Imports System.Web.Routing
Public Class Global_asax
Inherits System.Web.HttpApplication
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application is started
Application("ไม่เคย") = "Yes"
RegisterRoutes(RouteTable.Routes)
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
End Sub
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
' Fires at the beginning of each request
End Sub
Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
' Fires upon attempting to authenticate the use
End Sub
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Fires when an error occurs
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session ends
End Sub
Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application ends
End Sub
Sub RegisterRoutes(ByVal routes As RouteCollection)
'more...
End Sub
End Class
Code
Event Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If Application("ไม่เคย").ToString() = "Yes" Then
Popup("Hello New World")
Application("ไม่เคย") = "LIKE NOTHING ELSE"
End If