Error in Code

G

Guest

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
 
K

Ken Cox [Microsoft MVP]

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>
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top