473,407 Members | 2,312 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.

Need with Error Message

I'm just starting out in an introductory ASP.Net course, and am trying to run
a simple program but keeping getting an 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. Also Visual Studio .Net 2002 is also
installed.

"http://localhost/day1/listing0104.aspx" is placed in the address line of
Browser. 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>

My hunch is that the .Net Framework 1.1 might work better than the current
1.0v.

Any ideas as to what is causing the error?

Thank you,
Mark
Nov 19 '05 #1
25 1887
Suspect you need lang="vb" in your script tag - the ; is javascript and
may be your default client side language setting!

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:30**********************************@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.

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. Also Visual Studio .Net 2002 is also
installed.

"http://localhost/day1/listing0104.aspx" is placed in the address line of
Browser. 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>

My hunch is that the .Net Framework 1.1 might work better than the current
1.0v.

Any ideas as to what is causing the error?

Thank you,
Mark

Nov 19 '05 #2
Mark,

Your code looks fine to me. What is suspicious is that the ";" is a line
terminator in C#. Are you sure that you are using the VB compiler?
Hope this helps
------------------------
Nov 19 '05 #3
Thanks Brian - I was thinking C++ (C++ uses ';' too).

So I tryed a C# rendition of the program. The following error came up:

Line: 3
Char: 23
Erro: expected ')'
Code: 0
URL http://localhost/day1/listing0103.aspx

C# code:
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object obj, EventArgs e)
{
lblMessage.text = "Welcome to ASPNet!";
}
</script>
<html><body>
<asp:Label id="lblMessage" runat="server"/>
</body></html>

Anything else come to mind?
Thanks, Mark
"Brian Brown" wrote:
Mark,

Your code looks fine to me. What is suspicious is that the ";" is a line
terminator in C#. Are you sure that you are using the VB compiler?
Hope this helps
------------------------

Nov 19 '05 #4
John -

Thanks for the comment. I inserted your suggestion as:

<script runat="server" lang="VB">

But it still gave the the same error.

Any other suggestions?

"John Blair" wrote:
Suspect you need lang="vb" in your script tag - the ; is javascript and
may be your default client side language setting!

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:30**********************************@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.

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. Also Visual Studio .Net 2002 is also
installed.

"http://localhost/day1/listing0104.aspx" is placed in the address line of
Browser. 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>

My hunch is that the .Net Framework 1.1 might work better than the current
1.0v.

Any ideas as to what is causing the error?

Thank you,
Mark


Nov 19 '05 #5
Hi Mark,

The code below has a syntax error. It is lblMessage.Text (C# is case
sensitive). I fixed that problem and pasted it in a text file named
test.aspx in the root of my web server and ran it. No problems. The code
looks fine. I have pasted my code below. Please try the same thing and see
if it works for you. If not reply to this post with the details so we can
keep diagnosing.

I hope this helps.
-------------------------------
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object obj, EventArgs e)
{
lblMessage.Text = "Welcome to ASPNet!";
}
</script>
<html>
<body>
<asp:Label id="lblMessage" runat="server"/>
</body>
</html>
Nov 19 '05 #6
You have a couple of problems:

C# is case-sensitive.

Use lblMessage.Text
instead of lblMessage.text

Also, you are missing the </asp:Label> closing tag.

Here's the corrected code.
It should work fine.
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object obj, EventArgs e)
{
lblMessage.Text = "Welcome to ASPNet!";
}
</script>
<html>
<body>
<asp:Label ID="lblMessage" Runat="server" Text="Label"></asp:Label>
</body>
</html>

best regards,

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:E8**********************************@microsof t.com...
Thanks Brian - I was thinking C++ (C++ uses ';' too).

So I tryed a C# rendition of the program. The following error came up:

Line: 3
Char: 23
Erro: expected ')'
Code: 0
URL http://localhost/day1/listing0103.aspx

C# code:
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object obj, EventArgs e)
{
lblMessage.text = "Welcome to ASPNet!";
}
</script>
<html><body>
<asp:Label id="lblMessage" runat="server"/>
</body></html>

Anything else come to mind?
Thanks, Mark
"Brian Brown" wrote:
Mark,

Your code looks fine to me. What is suspicious is that the ";" is a
line
terminator in C#. Are you sure that you are using the VB compiler?
Hope this helps
------------------------

Nov 19 '05 #7
Brian -

Unfortunately, I get the same error as before...

Line: 3
Char: 23
Erro: expected ')'
Code: 0
URL http://localhost/day1/listing0103.aspx

Thank you for your help.

Mark
Nov 19 '05 #8
Juan -

I get the same error before.

MArk
Nov 19 '05 #9
Mark,

attached are bot C# and VB.NET
versions which I *know* work.

If neither of those work,
you've got a faulty installation.


Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
Juan -

I get the same error before.

MArk



Nov 19 '05 #10
Mark,

I agree with Juan. This is pretty simple code. If the code that either one
of us provided does not work you will probably need to reinstall.

Hope this helps.

Nov 19 '05 #11
I'd say I have an installation or configuration error, too.

What can I do?

What I have installed is:
IIS 5.1
..Net Framework (English) v1.0.3705
..Net Framwork SDK (English) 1.0a
Visual Studio .Net Enterprise Architect - English (2002)

Nov 19 '05 #12
To determine the version of the .NET Framework
on a computer that is running Microsoft Windows XP

1. Click Start, and then click Control Panel.

2. In Classic view, double-click Administrative Tools.

3. Double-click either Microsoft .NET Framework Configuration.

4. In the .NET Framework Configuration window,
click About .NET Framework Configuration on the Help menu.

The .NET Framework version number appears in the
"About .NET Framework Configuration" dialog box.

If the version number is 1.0.3705.0,
you have version 1.0 without any service packs installed.

If you don't have any .Net Framework SPs installed,
you could try installing the .NET Framework's SP3.

Download it at :

http://www.microsoft.com/downloads/d...DisplayLang=en

You don't need to install SP1 nor SP2, to install SP3.

Even better, you could download .Net Framework 1.1,
and install *that*.

The .Net 1.1 redistributable is available at :
http://www.microsoft.com/downloads/d...DisplayLang=en
( 23 MB )

The .Net Framework 1.1 SDK is available at :
http://www.microsoft.com/downloads/d...DisplayLang=en
(110 MB)

You should install .Net Framework 1.1 SP1,
after you install the .Net Framework 1.1 or the 1.1 SDK :

Get it from:
http://www.microsoft.com/downloads/d...displaylang=en
( 10 MB )

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
I'd say I have an installation or configuration error, too.

What can I do?

What I have installed is:
IIS 5.1
.Net Framework (English) v1.0.3705
.Net Framwork SDK (English) 1.0a
Visual Studio .Net Enterprise Architect - English (2002)



Nov 19 '05 #13
I should have added that you should uninstall
the .NET Framework 1.0 *before* installing 1.1

OK ?

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
I'd say I have an installation or configuration error, too.

What can I do?

What I have installed is:
IIS 5.1
.Net Framework (English) v1.0.3705
.Net Framwork SDK (English) 1.0a
Visual Studio .Net Enterprise Architect - English (2002)


Nov 19 '05 #14
Juan -

I will try the 1.1 installation.

I'm guessing v1.1 will not interfere with Visual Studio .Net 2002 (which
uses .Net Framework 1.0).

Thank you for your help.

Mark
Nov 19 '05 #15
Juan,

After you get the 1.1 framwork installed please give it a try again and then
post your results. We would be very interested to see them.

Good Luck!
Nov 19 '05 #16
Juan -

OK, Will .Net Framework 1.1 mess up Visual Studio .Net 2002?

Thanks Mark

"Juan T. Llibre" wrote:
I should have added that you should uninstall
the .NET Framework 1.0 *before* installing 1.1

OK ?

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
I'd say I have an installation or configuration error, too.

What can I do?

What I have installed is:
IIS 5.1
.Net Framework (English) v1.0.3705
.Net Framwork SDK (English) 1.0a
Visual Studio .Net Enterprise Architect - English (2002)



Nov 19 '05 #17
Mark,

After you install the framework will you please post your results of running
this page? We are very interested in seeing how it turns out.

Good Luck.
Nov 19 '05 #18
Juan -

Will I be able to use Visual Studio .Net 2002 with v1.1?

Thanks, Mark

"Juan T. Llibre" wrote:
I should have added that you should uninstall
the .NET Framework 1.0 *before* installing 1.1

OK ?

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
I'd say I have an installation or configuration error, too.

What can I do?

What I have installed is:
IIS 5.1
.Net Framework (English) v1.0.3705
.Net Framwork SDK (English) 1.0a
Visual Studio .Net Enterprise Architect - English (2002)



Nov 19 '05 #19
You should be able to run them both "side-by-side",
and still develop apps with VS.NET 2002.

For that, you would need to *not* uninstall
the .Net Framework 1.0, OK ?

If all you are looking for is to fix your .Net Framework
1.0 install and continue to use VS.NET 2002,
then you should install .Net Framework SP3.

You could also uninstall/reinstall .Net Framework 1.0,
and *then* install the .Net Framework SP3.

If you re-install VS.NET 2002,
make sure you apply SP3 afterwards.

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
Juan -

OK, Will .Net Framework 1.1 mess up Visual Studio .Net 2002?

Thanks Mark

"Juan T. Llibre" wrote:
I should have added that you should uninstall
the .NET Framework 1.0 *before* installing 1.1

OK ?

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
> I'd say I have an installation or configuration error, too.
>
> What can I do?
>
> What I have installed is:
> IIS 5.1
> .Net Framework (English) v1.0.3705
> .Net Framwork SDK (English) 1.0a
> Visual Studio .Net Enterprise Architect - English (2002)
>
>
>
>
>


Nov 19 '05 #20
re:
Juan,
After you get the 1.1
You mean "Mark"... :-)

I'm running 1.1 and 2.0...

Juan T. Llibre
ASP.NET MVP
===========
"Brian Brown" <Br********@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com... Juan,

After you get the 1.1 framwork installed please give it a try again and
then
post your results. We would be very interested to see them.

Good Luck!

Nov 19 '05 #21
Sorry Juan! It's been a long thread ;-)

"Juan T. Llibre" wrote:
re:
Juan,
After you get the 1.1


You mean "Mark"... :-)

I'm running 1.1 and 2.0...

Juan T. Llibre
ASP.NET MVP
===========
"Brian Brown" <Br********@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
Juan,

After you get the 1.1 framwork installed please give it a try again and
then
post your results. We would be very interested to see them.

Good Luck!


Nov 19 '05 #22
Gentlemen -

I installed .NET Framework's SP3. The system gave me the message that it
was already installed but I could "reinstall it" on .Net Framework and .Net
Framework SDK 1.0a, which of course I click yes.

I ran the simple C# and VB .aspx files and received the same error messages.

Will download and install v1.1 (without uninstalling 1.0).
Nov 19 '05 #23
Gentlemen -

Instead of loading .Net Framework 1.1, I uninstalled/installed .Net
Framework 1.0, .Net Framework SDK 1.0 and Service Pack 3.

Guess What - It worked!!!!!!!!!!!

Thanks for your patience and help

Nov 19 '05 #24
Congratulations, Mark!

Happy coding!

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com...
Gentlemen -

Instead of loading .Net Framework 1.1, I uninstalled/installed .Net
Framework 1.0, .Net Framework SDK 1.0 and Service Pack 3.

Guess What - It worked!!!!!!!!!!!

Thanks for your patience and help

Nov 19 '05 #25
Glad to see you solved the problem. I had similar problems doing the simple
application.

I found the aspx server extension wasn't setup on my web server. I used the
"aspnet_regiis.exe /I" to setup the extension and everything started to work.
"Juan T. Llibre" wrote:
Congratulations, Mark!

Happy coding!

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com...
Gentlemen -

Instead of loading .Net Framework 1.1, I uninstalled/installed .Net
Framework 1.0, .Net Framework SDK 1.0 and Service Pack 3.

Guess What - It worked!!!!!!!!!!!

Thanks for your patience and help


Nov 19 '05 #26

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

Similar topics

2
by: lawrence | last post by:
I've been bad about documentation so far but I'm going to try to be better. I've mostly worked alone so I'm the only one, so far, who's suffered from my bad habits. But I'd like other programmers...
6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
2
by: CSDunn | last post by:
Hello, I need some assistance with error handling in an Access 2003 Project form. The project is has a data source connection to a SQL Server 2000 database. The main form is named...
1
by: Marco Krechting | last post by:
Hi All, This is a response on my earlier posting about trapping the standard access error message when you click on a hyperlink field and the file cannot be found. I know now how to work on the...
7
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
4
by: Tressa | last post by:
I have a messagebox that I only want to pop up only if it is not already being displayed on the screen. My code is still poping up the messagebox even though it is on the screen. What am I doing...
2
by: Charles | last post by:
I need to find a way to share information between two classes, one is an employee class and the other is a custom error class that inherits from ApplicationException. These two classes are part of...
12
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded...
1
by: tccode97 | last post by:
Hi, I need an urgent help. I am developing a socket application in VC++ that uses asynchronous connnection. After doing search on google, I found the following link ...
5
by: Chuck Anderson | last post by:
I run Apache 2.0.55, and Php (both 4.4.1 and 5.2.5) on my home PC (Windows XP). One of the scripts that I run daily needs to access a secure URL (https://..............). When I am running Php4,...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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.