473,385 Members | 1,523 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,385 software developers and data experts.

Problems Getting Started

Hello,

I am using a recommended book on ASP.NET and already having problems with my
first example..here is the code:

<%@ Page Language="VB" %>

<script runat="server">
sub Page_Load(obj as object, e as eventargs)
lblMessage.Text = "Welcome to ASP.NET!"
end sub
</script>

<html>
<body>
<asp:Label id="lblMessage" runat="server"/>
</body>
</html>

when I try to view it on a web page, I get an error:

Line: 4
Char: 9
Error: Expected ';'
Code: 0

Suggestions?

Thanks,
Brian
Nov 19 '05 #1
5 848
Hmmm, works for me on .NET 1.1/IIS5. For some reason, it might be
trying to execute the code as C# (not sure why, as you have the
Language= directive). You could try changing to this on line 3:
<script runat="server" Language="VB">
..
Good luck,
Daniel
http://www.danhendricks.com

Nov 19 '05 #2
Interesting..I changed line 3 per your suggestion and no more error but no
text on the page.

"Daniel M. Hendricks" <dm*********@despammed.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Hmmm, works for me on .NET 1.1/IIS5. For some reason, it might be
trying to execute the code as C# (not sure why, as you have the
Language= directive). You could try changing to this on line 3:
<script runat="server" Language="VB">
.
Good luck,
Daniel
http://www.danhendricks.com

Nov 19 '05 #3
Something strange is going on there. I wonder if it's the document
encoding or something. Try saving it notepad and see if it runs.
That's all I got, sorry :P

Nov 19 '05 #4
Daniel M. Hendricks wrote:
Something strange is going on there. I wonder if it's the document
encoding or something. Try saving it notepad and see if it runs.
That's all I got, sorry :P


I think Brian is opening the aspx file directly through
Windows Explorer (c:\\inetpub\wwwroot\file.aspx),
instead of having it executed by a web server (through
http://localhost/file.aspx)

--

Riki
Nov 19 '05 #5
That's what it was..fixed now..thanks!

"Riki" <ri**@nospam.com> wrote in message
news:OC****************@TK2MSFTNGP12.phx.gbl...
Daniel M. Hendricks wrote:
Something strange is going on there. I wonder if it's the document
encoding or something. Try saving it notepad and see if it runs.
That's all I got, sorry :P


I think Brian is opening the aspx file directly through
Windows Explorer (c:\\inetpub\wwwroot\file.aspx),
instead of having it executed by a web server (through
http://localhost/file.aspx)

--

Riki

Nov 19 '05 #6

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

Similar topics

2
by: William F. O'Neill | last post by:
Have just upgraded my home installation of Oracle 10g. Was using 9i. The installation seemed to go fine, but with all the documentation, I'm having a hard time getting the Enterprise Manager to...
1
by: Patrick Carroll | last post by:
Hi, I have a problem installing MS VS.NET 2003. First of all, I have all the pre-requisites installed and I have the requirements in system and in OS. (Win2000 SP3, etc..) Now, I had to...
1
by: db2inst2 | last post by:
Hi all, This is what happens... When i try db2text start CTE0185 The update and locking services are already active. db2text control status
19
by: Jim | last post by:
I have spent the past few weeks designing a database for my company. The problem is I have started running into what I believe are stack overflow problems. There are two tab controls on the form...
3
by: Darryl Gore | last post by:
Hi, My girlfriends mum has just sent me a list of problems with their access database that I set up. firstly they got this error msaccessmp8 has caused an error in MSACCESSMP8.EXE & will...
14
by: Henk | last post by:
Hi Guys, (see actual code below) I wrote a little program that is supposed to read a file (input.txt) into memory (using a stack) and then reverse the file and display it to output. It works,...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
3
by: Josh Close | last post by:
I keep getting this error. DETAIL: Failed system call was shmget(key=5432001, size=34037760, 03600). HINT: This error usually means that PostgreSQL's request for a shared memory segment...
20
by: Alan Silver | last post by:
Hello, I have read about the problems that IE has when using a doctype of HTML 4.01 Transitional. I was advised to use Strict wherever possible. My question is, does the same apply to XHTML...
2
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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...

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.