473,407 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Error in Code

I'm just starting out in an introductory ASP.Net course, and am trying to run
a simple program but keeping getting an error.

"http://localhost/day1/listing0104.aspx" is placed in the address line of
Internet Explorer. The following error message displays:

Line: 5
Char: 5
Error: Expected ';'
Code: 0
URL: http://localhost/day1/listing0104.aspx

The program is a follows:
<%@ Page Language="VB" %>

<script runat="server">

sub Page_Load(obj as object, e as eventargs)
lblMessage.text = "Welcome to ASPNet!"
end sub

</script>

<html><body>
<asp:Label id="lblMessage" runat="server"/>
</body></html>
Any help as to what is causing the error?

I'm running XP, have installed Internet Information Services (5.1) ,
Microsoft .Net Framework (English) v1.0.3705 and Microsoft .Net Framework SDK
(English) v1.0a on my computer. (and Visual Studio .Net 2002)

Thank you,
Mark

Nov 19 '05 #1
3 1541
Where's the <form runat="server">?

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
I'm just starting out in an introductory ASP.Net course, and am trying to
run
a simple program but keeping getting an error.

"http://localhost/day1/listing0104.aspx" is placed in the address line of
Internet Explorer. The following error message displays:

Line: 5
Char: 5
Error: Expected ';'
Code: 0
URL: http://localhost/day1/listing0104.aspx

The program is a follows:
<%@ Page Language="VB" %>

<script runat="server">

sub Page_Load(obj as object, e as eventargs)
lblMessage.text = "Welcome to ASPNet!"
end sub

</script>

<html><body>
<asp:Label id="lblMessage" runat="server"/>
</body></html>
Any help as to what is causing the error?

I'm running XP, have installed Internet Information Services (5.1) ,
Microsoft .Net Framework (English) v1.0.3705 and Microsoft .Net Framework
SDK
(English) v1.0a on my computer. (and Visual Studio .Net 2002)

Thank you,
Mark


Nov 19 '05 #2
Hi Mark,

Try it like this?

<%@ Page Language="VB" %>
<html>
<script runat="server">

sub Page_Load(obj as object, e as eventargs)
lblMessage.text = "Welcome to ASPNet!"
end sub

</script>
<body>
<form runat="server">
<asp:label id="lblMessage" runat="server" /></form>
</body>
</html>

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
I'm just starting out in an introductory ASP.Net course, and am trying to
run
a simple program but keeping getting an error.

"http://localhost/day1/listing0104.aspx" is placed in the address line of
Internet Explorer. The following error message displays:

Line: 5
Char: 5
Error: Expected ';'
Code: 0
URL: http://localhost/day1/listing0104.aspx

The program is a follows:
<%@ Page Language="VB" %>

<script runat="server">

sub Page_Load(obj as object, e as eventargs)
lblMessage.text = "Welcome to ASPNet!"
end sub

</script>

<html><body>
<asp:Label id="lblMessage" runat="server"/>
</body></html>
Any help as to what is causing the error?

I'm running XP, have installed Internet Information Services (5.1) ,
Microsoft .Net Framework (English) v1.0.3705 and Microsoft .Net Framework
SDK
(English) v1.0a on my computer. (and Visual Studio .Net 2002)

Thank you,
Mark


Nov 19 '05 #3
Thanks for the code.

Unfortunately, the same error message still comes up.

I tend to think that the software loaded on my computer is not the proper
combination - but that is a hunch.

Any other ideas would be most apreciated.

Mark

"Ken Cox [Microsoft MVP]" wrote:
Hi Mark,

Try it like this?

<%@ Page Language="VB" %>
<html>
<script runat="server">

sub Page_Load(obj as object, e as eventargs)
lblMessage.text = "Welcome to ASPNet!"
end sub

</script>
<body>
<form runat="server">
<asp:label id="lblMessage" runat="server" /></form>
</body>
</html>

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
I'm just starting out in an introductory ASP.Net course, and am trying to
run
a simple program but keeping getting an error.

"http://localhost/day1/listing0104.aspx" is placed in the address line of
Internet Explorer. The following error message displays:

Line: 5
Char: 5
Error: Expected ';'
Code: 0
URL: http://localhost/day1/listing0104.aspx

The program is a follows:
<%@ Page Language="VB" %>

<script runat="server">

sub Page_Load(obj as object, e as eventargs)
lblMessage.text = "Welcome to ASPNet!"
end sub

</script>

<html><body>
<asp:Label id="lblMessage" runat="server"/>
</body></html>
Any help as to what is causing the error?

I'm running XP, have installed Internet Information Services (5.1) ,
Microsoft .Net Framework (English) v1.0.3705 and Microsoft .Net Framework
SDK
(English) v1.0a on my computer. (and Visual Studio .Net 2002)

Thank you,
Mark


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
2
by: Gregory | last post by:
Hi, One of the disadvantages of using error handling with error codes instead of exception handling is that error codes retuned from a function can be forgotten to check thus leading to...
13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
16
by: Steve Jorgensen | last post by:
I'm trying to figure out if there is a way to generate standard error handlers that "know" if the calling code has an error handler in effect (On Error Goto <label> or On Error Resume Next) before...
6
by: Squirrel | last post by:
I have a command button on a subform to delete a record. The only statement in the subroutine is: DoCmd.RunCommand acCmdDeleteRecord The subform's recordsource is "select * from tblVisit order...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
4
by: Eugene Anthony | last post by:
One problem with the code bellow is after this code conn.qDupUser p1,rs I added: set rs = nothing to test the error handling capability.
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.