global.asax:
Global.asax.vb<%@ Application Codebehind="Global.asax.vb" Inherits="AdamItiel.GlobalApp" Language="vb" %>
Code:Imports System.Web.SessionState Namespace AdamItiel Public Class GlobalApp Inherits System.Web.HttpApplication Private Shared userFirstNameVal As String Public Shared Property UserFirstName() As String Get Return userFirstNameVal End Get Set(ByVal value As String) userFirstNameVal = value End Set End Property Private Shared newPropertyValue As String Public Shared Property UserLastname() As String Get Return newPropertyValue End Get Set(ByVal value As String) newPropertyValue = value End Set End Property Private Shared newPropertyValue2 As String Public Shared Property ClientTypeDesc() As String Get Return newPropertyValue2 End Get Set(ByVal value As String) newPropertyValue2 = value End Set End Property Private Shared newPropertyValue3 As String Public Shared Property Coach() As String Get Return newPropertyValue3 End Get Set(ByVal value As String) newPropertyValue3 = value End Set End Property Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) ' Fires when the application is started 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 End Class End Namespace
Default.aspx:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="AdamItiel._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
QQQQQQQQQQQQQQQQQ
</div>
</form>
</body>
</html>
Default.aspx.vb
Code:Namespace AdamItiel Public Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub End Class End Namespace
If I try open browser at Default.aspx I get "Could not load type 'AdamItiel.GlobalApp'". Why? What should I change to get rid of it?


Reply With Quote


Bookmarks