F
fd123456
Hi Tom,
I have just read your previous message about not having VS. I have
never tried compiling anything without it, so I don't know the
particular pitfalls you might encounter.
Global.asax is not a code-behind file. In VS, there is another file,
called Global.asax.vb, which contains (comments removed) :
Imports System.Web
Imports System.Web.SessionState
Public Class Global
Inherits System.Web.HttpApplication
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Private components As System.ComponentModel.IContainer
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
components = New System.ComponentModel.Container()
End Sub
(then the standard Application_Start, etc, stuff)
End Class
Apparently, you're using <script> tags in your Global.asax, which
sounds strange, because it's not a web page at all. There is a
"design" mode in VS, but no web page associated to it.
Inside this class, I added :
Shared Function test() As String
Return "hello"
End Function
And in a WebForm, I added a Label and edited the Page_Load handler
thus :
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Label1.Text = Global.test
End Sub
When running the project, the label does show "hello". This might help
: in my Webform.aspx, the header differs from yours. It's :
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="myTestProject.WebForm1"%>
...where "myTestProject" is the name of - you guessed it - my project,
and "WebForm1" is the name of my WebForm.
To sum up, I think that your Global.asax file needs to contains an
explicit "Global" class.
That being said, although I command your courage to start a web app
without VS, I would strongly advise you to download, if at all
possible, a demo version of it (I know there's a 90-day fully
functional demo somewhere, and think I've seen something like "2005
express"), so you can at last test the system the easy way and then
analyse how VS builds its codebehind files and key project files.
Keep me posted if you're still in trouble.
Michel.
I have just read your previous message about not having VS. I have
never tried compiling anything without it, so I don't know the
particular pitfalls you might encounter.
Global.asax is not a code-behind file. In VS, there is another file,
called Global.asax.vb, which contains (comments removed) :
Imports System.Web
Imports System.Web.SessionState
Public Class Global
Inherits System.Web.HttpApplication
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Private components As System.ComponentModel.IContainer
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
components = New System.ComponentModel.Container()
End Sub
(then the standard Application_Start, etc, stuff)
End Class
Apparently, you're using <script> tags in your Global.asax, which
sounds strange, because it's not a web page at all. There is a
"design" mode in VS, but no web page associated to it.
Inside this class, I added :
Shared Function test() As String
Return "hello"
End Function
And in a WebForm, I added a Label and edited the Page_Load handler
thus :
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Label1.Text = Global.test
End Sub
When running the project, the label does show "hello". This might help
: in my Webform.aspx, the header differs from yours. It's :
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="myTestProject.WebForm1"%>
...where "myTestProject" is the name of - you guessed it - my project,
and "WebForm1" is the name of my WebForm.
To sum up, I think that your Global.asax file needs to contains an
explicit "Global" class.
That being said, although I command your courage to start a web app
without VS, I would strongly advise you to download, if at all
possible, a demo version of it (I know there's a 90-day fully
functional demo somewhere, and think I've seen something like "2005
express"), so you can at last test the system the easy way and then
analyse how VS builds its codebehind files and key project files.
Keep me posted if you're still in trouble.
Michel.