473,466 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Error in Hello World page

I just started working thru a book on ASP.NET and am trying to display their
Hello World page. Below is the page.
When I attempt to display it with IE, I get an error on line 23, 'runtime
error, expected ';'. Any clues?

<%@ Page Language="VB" %>

<html>
<head>
<title>Simple test ASP.NET page</title>
</head>
<body>
<form runat="server">
<h2>A Simple ASP.NET Page</h2>
<p>Enter your name in the box below, then click the button:</p>
<p>
<asp:TextBox id="txtNameBox" runat="server" />
<asp:Button id="btnSubmit" onclick="btnSubmit_Click"
runat="server" Text="Click Here!" />
</p>
<p>
<asp:Label id="lblMessageLabel" runat="server" />
</p>
</form>
</body>
</html>

<script runat="server">
Sub btnSubmit_Click(sender As Object, e As EventArgs)
lblMessageLabel.Text = "Hello " & txtNameBox.Text
End Sub
</script>
Jul 21 '05 #1
3 1295
It's hard to respond to this... I just don't see a lot of folks writing code
that is embedded in the web page.

Have you looked at using WebMatrix?
http://www.asp.net/webmatrix/default...dex=4&tabId=46

The good folks at asp.net may be able to provide tools and techniques that
can help you.

--- Nick

"mscertified" <ru****@tigerlily.com> wrote in message
news:C1**********************************@microsof t.com...
I just started working thru a book on ASP.NET and am trying to display their Hello World page. Below is the page.
When I attempt to display it with IE, I get an error on line 23, 'runtime
error, expected ';'. Any clues?

<%@ Page Language="VB" %>

<html>
<head>
<title>Simple test ASP.NET page</title>
</head>
<body>
<form runat="server">
<h2>A Simple ASP.NET Page</h2>
<p>Enter your name in the box below, then click the button:</p>
<p>
<asp:TextBox id="txtNameBox" runat="server" />
<asp:Button id="btnSubmit" onclick="btnSubmit_Click"
runat="server" Text="Click Here!" />
</p>
<p>
<asp:Label id="lblMessageLabel" runat="server" />
</p>
</form>
</body>
</html>

<script runat="server">
Sub btnSubmit_Click(sender As Object, e As EventArgs)
lblMessageLabel.Text = "Hello " & txtNameBox.Text
End Sub
</script>

Jul 21 '05 #2
Just put ";" after "lblMessageLabel.Text = "Hello " & txtNameBox.Text". As
the error said (expected ';').

Like this:
Sub btnSubmit_Click(sender As Object, e As EventArgs)
Sub btnSubmit_Click(sender As Object, e As EventArgs)
lblMessageLabel.Text = "Hello " & txtNameBox.Text ;
End Sub
"mscertified" wrote:
I just started working thru a book on ASP.NET and am trying to display their
Hello World page. Below is the page.
When I attempt to display it with IE, I get an error on line 23, 'runtime
error, expected ';'. Any clues?

<%@ Page Language="VB" %>

<html>
<head>
<title>Simple test ASP.NET page</title>
</head>
<body>
<form runat="server">
<h2>A Simple ASP.NET Page</h2>
<p>Enter your name in the box below, then click the button:</p>
<p>
<asp:TextBox id="txtNameBox" runat="server" />
<asp:Button id="btnSubmit" onclick="btnSubmit_Click"
runat="server" Text="Click Here!" />
</p>
<p>
<asp:Label id="lblMessageLabel" runat="server" />
</p>
</form>
</body>
</html>

<script runat="server">
Sub btnSubmit_Click(sender As Object, e As EventArgs)
lblMessageLabel.Text = "Hello " & txtNameBox.Text
End Sub
</script>

Jul 21 '05 #3
This was just a page in the book that verifies that .NET is working on my PC,
no other purpose.

"Nick Malik" wrote:
It's hard to respond to this... I just don't see a lot of folks writing code
that is embedded in the web page.

Have you looked at using WebMatrix?
http://www.asp.net/webmatrix/default...dex=4&tabId=46

The good folks at asp.net may be able to provide tools and techniques that
can help you.

--- Nick

"mscertified" <ru****@tigerlily.com> wrote in message
news:C1**********************************@microsof t.com...
I just started working thru a book on ASP.NET and am trying to display

their
Hello World page. Below is the page.
When I attempt to display it with IE, I get an error on line 23, 'runtime
error, expected ';'. Any clues?

<%@ Page Language="VB" %>

<html>
<head>
<title>Simple test ASP.NET page</title>
</head>
<body>
<form runat="server">
<h2>A Simple ASP.NET Page</h2>
<p>Enter your name in the box below, then click the button:</p>
<p>
<asp:TextBox id="txtNameBox" runat="server" />
<asp:Button id="btnSubmit" onclick="btnSubmit_Click"
runat="server" Text="Click Here!" />
</p>
<p>
<asp:Label id="lblMessageLabel" runat="server" />
</p>
</form>
</body>
</html>

<script runat="server">
Sub btnSubmit_Click(sender As Object, e As EventArgs)
lblMessageLabel.Text = "Hello " & txtNameBox.Text
End Sub
</script>


Jul 21 '05 #4

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

Similar topics

2
by: Dr DOOM | last post by:
Hi folks...I've just installed asp.net framework and asp.net sdk and I've cut and pasted a file from the web to test that it works. The problem is that I get this error message which says: ...
1
by: Keith | last post by:
All, I have been told this is an ASP.NET issue and not an IIS issue, so I am posting this here. I have a problem with ASP.NET returning an HTTP 500 error when trying to run ASPX pages on...
1
by: Sean | last post by:
I can't do any of the ASP.NET samples as everytime I run the sample I get a parser error. This is the text. Server Error in '/Hello World' Application....
1
by: KGarvin | last post by:
Open Visual Studio and create a new ASP.NET Web Services Project. Uncomment the test webmethod (Hello World) in the .asmx file, set as starup file, save and build project and run. Click on the...
3
by: mscertified | last post by:
I just started working thru a book on ASP.NET and am trying to display their Hello World page. Below is the page. When I attempt to display it with IE, I get an error on line 23, 'runtime error,...
10
by: DaveS | last post by:
I've been trying to start out learning some ASP and I've been trying to create the classic 'Hello world' program. I'm running the ASP pages on some webspace I have, rather than on my computer....
3
by: Josh Pencheon | last post by:
Hello. My name is Josh, from the UK. I'm 16, and having a spot of bother with some javascript I've been working on over the past few days, that gives a sliding menu. <html> <head> <script...
21
by: comp.lang.tcl | last post by:
set php {<? print_r("Hello World"); ?>} puts $php; # PRINTS OUT <? print_r("Hello World"); ?> puts When I try this within TCL I get the following error:
4
by: Abubakar | last post by:
Hi, I'm working on an application whose code was written by some other developer and I dont completely understand its source code right now. In one of the pages where I'm writing a test code, at...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.