M
Marc Violette
<Reply-To: (e-mail address removed)>
Hello,
I'm hoping someone can help me out here... I'm a beginner ASP.NET
developper, and am trying to follow a series of exercises in the book
entitled "Microsoft ASP.NET Step By Step" by Microsoft Press.
When I try to display *any* ASP.NET page with a Sub() somewhere, I get the
following error:
------ BEGIN ERROR MESSAGE -------------
Line: 5
Char: 9
Error: Expected ';'
Code:0
URL: http://localhost/Exercises/HelloContainer.aspx
------ END ERROR MESSAGE -----------------
I thought this might have something to do with the fact that the compiler
thinks I want to use a different language than VB. So I set the "Page
Language" directive to "VB", as indicated in the code below.
Here is the code for "HelloContainer.aspx". Note that the line# and char#
in the error message corresponds to the space after the "Sub" decleration.
------ BEGIN HelloContainer.aspx ------------------
<%@ Page Language="vb" %>
<%@ Register TagPrefix="ASPNETSBS" TagName="Hello" Src="Hello.ascx" %>
<script runat="server">
Sub Page_Load(Sender As Object, E As EventArgs)
MyHello.Name = "Andrew"
MYHello.SayHello
End Sub
</script>
<html>
<head>
</head>
<body>
<ASPNETSBS:Hello id="MyHello" runat="server"
OnLoad="MyHello_Load"></ASPNETSBS:Hello>
</body>
</html>
-------------------------------------------------------------
I am getting very frustrated... No matter what is after the "Sub" it won't
continue past that point. I tried creating a GLOBAL.ASAX file, and a
WEB.CONFIG file, but to no avail...
Any help would be appreciated.
Please send replies to: (e-mail address removed)
Thanks a million!
Hello,
I'm hoping someone can help me out here... I'm a beginner ASP.NET
developper, and am trying to follow a series of exercises in the book
entitled "Microsoft ASP.NET Step By Step" by Microsoft Press.
When I try to display *any* ASP.NET page with a Sub() somewhere, I get the
following error:
------ BEGIN ERROR MESSAGE -------------
Line: 5
Char: 9
Error: Expected ';'
Code:0
URL: http://localhost/Exercises/HelloContainer.aspx
------ END ERROR MESSAGE -----------------
I thought this might have something to do with the fact that the compiler
thinks I want to use a different language than VB. So I set the "Page
Language" directive to "VB", as indicated in the code below.
Here is the code for "HelloContainer.aspx". Note that the line# and char#
in the error message corresponds to the space after the "Sub" decleration.
------ BEGIN HelloContainer.aspx ------------------
<%@ Page Language="vb" %>
<%@ Register TagPrefix="ASPNETSBS" TagName="Hello" Src="Hello.ascx" %>
<script runat="server">
Sub Page_Load(Sender As Object, E As EventArgs)
MyHello.Name = "Andrew"
MYHello.SayHello
End Sub
</script>
<html>
<head>
</head>
<body>
<ASPNETSBS:Hello id="MyHello" runat="server"
OnLoad="MyHello_Load"></ASPNETSBS:Hello>
</body>
</html>
-------------------------------------------------------------
I am getting very frustrated... No matter what is after the "Sub" it won't
continue past that point. I tried creating a GLOBAL.ASAX file, and a
WEB.CONFIG file, but to no avail...
Any help would be appreciated.
Please send replies to: (e-mail address removed)
Thanks a million!