By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,885 Members | 1,072 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,885 IT Pros & Developers. It's quick & easy.

Error in Code

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.