<Reply-To: ve*****@sympatico.ca>
Hello,
I'm hoping someone can help me out here... I'm a beginner ASP.NET
developper, and am trying to follow a series of exercises in the book
entitled "Microsoft ASP.NET Step By Step" by Microsoft Press.
When I try to display *any* ASP.NET page with a Sub() somewhere, I get the
following error:
------ BEGIN ERROR MESSAGE -------------
Line: 5
Char: 9
Error: Expected ';'
Code:0
URL: http://localhost/Exercises/HelloContainer.aspx
------ END ERROR MESSAGE -----------------
I thought this might have something to do with the fact that the compiler
thinks I want to use a different language than VB. So I set the "Page
Language" directive to "VB", as indicated in the code below.
Here is the code for "HelloContainer.aspx". Note that the line# and char#
in the error message corresponds to the space after the "Sub" decleration.
------ BEGIN HelloContainer.aspx ------------------
<%@ Page Language="vb" %>
<%@ Register TagPrefix="ASPNETSBS" TagName="Hello" Src="Hello.ascx" %>
<script runat="server">
Sub Page_Load(Sender As Object, E As EventArgs)
MyHello.Name = "Andrew"
MYHello.SayHello
End Sub
</script>
<html>
<head>
</head>
<body>
<ASPNETSBS:Hello id="MyHello" runat="server"
OnLoad="MyHello_Load"></ASPNETSBS:Hello>
</body>
</html>
-------------------------------------------------------------
I am getting very frustrated... No matter what is after the "Sub" it won't
continue past that point. I tried creating a GLOBAL.ASAX file, and a
WEB.CONFIG file, but to no avail...
Any help would be appreciated.
Please send replies to: ve*****@sympatico.ca
Thanks a million! 5 1780
The error might not be what you think. This looks like a browser error, not
a server error. If it's a browser error than there is a good chance it has
absolutely nothing to do with the sub. Use a View Source in IE to view the
actual code that the browser is throwing the error from. Chances are it's
some JavaScript that is throwing the error that is being emitted by the
control or one of the controls as JavaScript will usually get emitted at the
very top of the file.
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
"Marc Violette" <ve*****@sympatico.ca> wrote in message
news:OL*************@TK2MSFTNGP12.phx.gbl... <Reply-To: ve*****@sympatico.ca>
Hello,
I'm hoping someone can help me out here... I'm a beginner ASP.NET developper, and am trying to follow a series of exercises in the book entitled "Microsoft ASP.NET Step By Step" by Microsoft Press.
When I try to display *any* ASP.NET page with a Sub() somewhere, I get the following error:
------ BEGIN ERROR MESSAGE ------------- Line: 5 Char: 9 Error: Expected ';' Code:0 URL: http://localhost/Exercises/HelloContainer.aspx ------ END ERROR MESSAGE -----------------
I thought this might have something to do with the fact that the compiler thinks I want to use a different language than VB. So I set the "Page Language" directive to "VB", as indicated in the code below.
Here is the code for "HelloContainer.aspx". Note that the line# and char# in the error message corresponds to the space after the "Sub" decleration.
------ BEGIN HelloContainer.aspx ------------------ <%@ Page Language="vb" %> <%@ Register TagPrefix="ASPNETSBS" TagName="Hello" Src="Hello.ascx" %>
<script runat="server"> Sub Page_Load(Sender As Object, E As EventArgs) MyHello.Name = "Andrew" MYHello.SayHello End Sub
</script> <html> <head> </head> <body> <ASPNETSBS:Hello id="MyHello" runat="server" OnLoad="MyHello_Load"></ASPNETSBS:Hello> </body> </html> -------------------------------------------------------------
I am getting very frustrated... No matter what is after the "Sub" it won't continue past that point. I tried creating a GLOBAL.ASAX file, and a WEB.CONFIG file, but to no avail...
Any help would be appreciated.
Please send replies to: ve*****@sympatico.ca
Thanks a million!
Hi,
Thanks for the tip, but no go... No matter what I type in between the
"<script>" the compiler doesn't seem to understand it. I am running .NET FW
1.1 and basic code appears to work (like the simple "Response.Write")
function, but nothing else...
Any other ideas ?
Thanks again.
"Mark Fitzpatrick" <ma******@fitzme.com> wrote in message
news:em**************@tk2msftngp13.phx.gbl... The error might not be what you think. This looks like a browser error,
not a server error. If it's a browser error than there is a good chance it has absolutely nothing to do with the sub. Use a View Source in IE to view the actual code that the browser is throwing the error from. Chances are it's some JavaScript that is throwing the error that is being emitted by the control or one of the controls as JavaScript will usually get emitted at
the very top of the file.
Hope this helps, Mark Fitzpatrick Microsoft MVP - FrontPage
"Marc Violette" <ve*****@sympatico.ca> wrote in message news:OL*************@TK2MSFTNGP12.phx.gbl... <Reply-To: ve*****@sympatico.ca>
Hello,
I'm hoping someone can help me out here... I'm a beginner ASP.NET developper, and am trying to follow a series of exercises in the book entitled "Microsoft ASP.NET Step By Step" by Microsoft Press.
When I try to display *any* ASP.NET page with a Sub() somewhere, I get
the following error:
------ BEGIN ERROR MESSAGE ------------- Line: 5 Char: 9 Error: Expected ';' Code:0 URL: http://localhost/Exercises/HelloContainer.aspx ------ END ERROR MESSAGE -----------------
I thought this might have something to do with the fact that the
compiler thinks I want to use a different language than VB. So I set the "Page Language" directive to "VB", as indicated in the code below.
Here is the code for "HelloContainer.aspx". Note that the line# and
char# in the error message corresponds to the space after the "Sub"
decleration. ------ BEGIN HelloContainer.aspx ------------------ <%@ Page Language="vb" %> <%@ Register TagPrefix="ASPNETSBS" TagName="Hello" Src="Hello.ascx" %>
<script runat="server"> Sub Page_Load(Sender As Object, E As EventArgs) MyHello.Name = "Andrew" MYHello.SayHello End Sub
</script> <html> <head> </head> <body> <ASPNETSBS:Hello id="MyHello" runat="server" OnLoad="MyHello_Load"></ASPNETSBS:Hello> </body> </html> -------------------------------------------------------------
I am getting very frustrated... No matter what is after the "Sub" it won't continue past that point. I tried creating a GLOBAL.ASAX file, and a WEB.CONFIG file, but to no avail...
Any help would be appreciated.
Please send replies to: ve*****@sympatico.ca
Thanks a million!
My initial guess is that something's wrong in your Hello.ascx page and/or
codebehind.
Karl
"Marc Violette" <ve*****@sympatico.ca> wrote in message
news:u0**************@TK2MSFTNGP10.phx.gbl... Hi,
Thanks for the tip, but no go... No matter what I type in between the "<script>" the compiler doesn't seem to understand it. I am running .NET
FW 1.1 and basic code appears to work (like the simple "Response.Write") function, but nothing else...
Any other ideas ?
Thanks again.
"Mark Fitzpatrick" <ma******@fitzme.com> wrote in message news:em**************@tk2msftngp13.phx.gbl... The error might not be what you think. This looks like a browser error, not a server error. If it's a browser error than there is a good chance it
has absolutely nothing to do with the sub. Use a View Source in IE to view
the actual code that the browser is throwing the error from. Chances are
it's some JavaScript that is throwing the error that is being emitted by the control or one of the controls as JavaScript will usually get emitted at the very top of the file.
Hope this helps, Mark Fitzpatrick Microsoft MVP - FrontPage
"Marc Violette" <ve*****@sympatico.ca> wrote in message news:OL*************@TK2MSFTNGP12.phx.gbl... <Reply-To: ve*****@sympatico.ca>
Hello,
I'm hoping someone can help me out here... I'm a beginner ASP.NET developper, and am trying to follow a series of exercises in the book entitled "Microsoft ASP.NET Step By Step" by Microsoft Press.
When I try to display *any* ASP.NET page with a Sub() somewhere, I get the following error:
------ BEGIN ERROR MESSAGE ------------- Line: 5 Char: 9 Error: Expected ';' Code:0 URL: http://localhost/Exercises/HelloContainer.aspx ------ END ERROR MESSAGE -----------------
I thought this might have something to do with the fact that the compiler thinks I want to use a different language than VB. So I set the "Page Language" directive to "VB", as indicated in the code below.
Here is the code for "HelloContainer.aspx". Note that the line# and char# in the error message corresponds to the space after the "Sub" decleration. ------ BEGIN HelloContainer.aspx ------------------ <%@ Page Language="vb" %> <%@ Register TagPrefix="ASPNETSBS" TagName="Hello" Src="Hello.ascx" %>
<script runat="server"> Sub Page_Load(Sender As Object, E As EventArgs) MyHello.Name = "Andrew" MYHello.SayHello End Sub
</script> <html> <head> </head> <body> <ASPNETSBS:Hello id="MyHello" runat="server" OnLoad="MyHello_Load"></ASPNETSBS:Hello> </body> </html> -------------------------------------------------------------
I am getting very frustrated... No matter what is after the "Sub" it won't continue past that point. I tried creating a GLOBAL.ASAX file, and a WEB.CONFIG file, but to no avail...
Any help would be appreciated.
Please send replies to: ve*****@sympatico.ca
Thanks a million!
Hi, thanks for your help...
It appears it is *all* of my user controls... No matter what control I use
(either ones I develop or the sample ones from the CD), I always get the
same error message saying I am missing a ";" before the first Sub of any
embedded <script> sections.
Does anyone know of a section in a configuration file that would have
anything to do with this ?
Maybe I'll try a C# script instead of a VB script... This would help
determine if it is a problem with the compiler not recognizing the Sub, or
if it's a more complex issue surrounding my installation.
Thanks.
"Karl" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in
message news:u0*************@tk2msftngp13.phx.gbl... My initial guess is that something's wrong in your Hello.ascx page and/or codebehind.
Karl
"Marc Violette" <ve*****@sympatico.ca> wrote in message news:u0**************@TK2MSFTNGP10.phx.gbl... Hi,
Thanks for the tip, but no go... No matter what I type in between the "<script>" the compiler doesn't seem to understand it. I am running
..NET FW 1.1 and basic code appears to work (like the simple "Response.Write") function, but nothing else...
Any other ideas ?
Thanks again.
"Mark Fitzpatrick" <ma******@fitzme.com> wrote in message news:em**************@tk2msftngp13.phx.gbl... The error might not be what you think. This looks like a browser
error, not a server error. If it's a browser error than there is a good chance it has absolutely nothing to do with the sub. Use a View Source in IE to view the actual code that the browser is throwing the error from. Chances are it's some JavaScript that is throwing the error that is being emitted by
the control or one of the controls as JavaScript will usually get emitted
at the very top of the file.
Hope this helps, Mark Fitzpatrick Microsoft MVP - FrontPage
"Marc Violette" <ve*****@sympatico.ca> wrote in message news:OL*************@TK2MSFTNGP12.phx.gbl... > <Reply-To: ve*****@sympatico.ca> > > Hello, > > I'm hoping someone can help me out here... I'm a beginner ASP.NET > developper, and am trying to follow a series of exercises in the
book > entitled "Microsoft ASP.NET Step By Step" by Microsoft Press. > > When I try to display *any* ASP.NET page with a Sub() somewhere, I
get the > following error: > > ------ BEGIN ERROR MESSAGE ------------- > Line: 5 > Char: 9 > Error: Expected ';' > Code:0 > URL: http://localhost/Exercises/HelloContainer.aspx > ------ END ERROR MESSAGE ----------------- > > I thought this might have something to do with the fact that the compiler > thinks I want to use a different language than VB. So I set the
"Page > Language" directive to "VB", as indicated in the code below. > > Here is the code for "HelloContainer.aspx". Note that the line# and char# > in the error message corresponds to the space after the "Sub" decleration. > > ------ BEGIN HelloContainer.aspx ------------------ > <%@ Page Language="vb" %> > <%@ Register TagPrefix="ASPNETSBS" TagName="Hello" Src="Hello.ascx"
%> > > <script runat="server"> > Sub Page_Load(Sender As Object, E As EventArgs) > MyHello.Name = "Andrew" > MYHello.SayHello > End Sub > > </script> > <html> > <head> > </head> > <body> > <ASPNETSBS:Hello id="MyHello" runat="server" > OnLoad="MyHello_Load"></ASPNETSBS:Hello> > </body> > </html> > ------------------------------------------------------------- > > I am getting very frustrated... No matter what is after the "Sub"
it > won't > continue past that point. I tried creating a GLOBAL.ASAX file, and
a > WEB.CONFIG file, but to no avail... > > Any help would be appreciated. > > Please send replies to: ve*****@sympatico.ca > > Thanks a million! > >
This is true even if the user control is blank? What if it doens't have a
codebehind section?
In your web.config, what's the defaultLanguage of the compilation element
set to?
karl
"Marc Violette" <ve*****@sympatico.ca> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Hi, thanks for your help...
It appears it is *all* of my user controls... No matter what control I
use (either ones I develop or the sample ones from the CD), I always get the same error message saying I am missing a ";" before the first Sub of any embedded <script> sections.
Does anyone know of a section in a configuration file that would have anything to do with this ?
Maybe I'll try a C# script instead of a VB script... This would help determine if it is a problem with the compiler not recognizing the Sub, or if it's a more complex issue surrounding my installation.
Thanks.
"Karl" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:u0*************@tk2msftngp13.phx.gbl... My initial guess is that something's wrong in your Hello.ascx page
and/or codebehind.
Karl
"Marc Violette" <ve*****@sympatico.ca> wrote in message news:u0**************@TK2MSFTNGP10.phx.gbl... Hi,
Thanks for the tip, but no go... No matter what I type in between the "<script>" the compiler doesn't seem to understand it. I am running .NET FW 1.1 and basic code appears to work (like the simple "Response.Write") function, but nothing else...
Any other ideas ?
Thanks again.
"Mark Fitzpatrick" <ma******@fitzme.com> wrote in message news:em**************@tk2msftngp13.phx.gbl... > The error might not be what you think. This looks like a browser error, not > a server error. If it's a browser error than there is a good chance
it has > absolutely nothing to do with the sub. Use a View Source in IE to
view the > actual code that the browser is throwing the error from. Chances are it's > some JavaScript that is throwing the error that is being emitted by the > control or one of the controls as JavaScript will usually get
emitted at the > very top of the file. > > Hope this helps, > Mark Fitzpatrick > Microsoft MVP - FrontPage > > "Marc Violette" <ve*****@sympatico.ca> wrote in message > news:OL*************@TK2MSFTNGP12.phx.gbl... > > <Reply-To: ve*****@sympatico.ca> > > > > Hello, > > > > I'm hoping someone can help me out here... I'm a beginner ASP.NET > > developper, and am trying to follow a series of exercises in the book > > entitled "Microsoft ASP.NET Step By Step" by Microsoft Press. > > > > When I try to display *any* ASP.NET page with a Sub() somewhere, I get the > > following error: > > > > ------ BEGIN ERROR MESSAGE ------------- > > Line: 5 > > Char: 9 > > Error: Expected ';' > > Code:0 > > URL: http://localhost/Exercises/HelloContainer.aspx > > ------ END ERROR MESSAGE ----------------- > > > > I thought this might have something to do with the fact that the compiler > > thinks I want to use a different language than VB. So I set the "Page > > Language" directive to "VB", as indicated in the code below. > > > > Here is the code for "HelloContainer.aspx". Note that the line#
and char# > > in the error message corresponds to the space after the "Sub" decleration. > > > > ------ BEGIN HelloContainer.aspx ------------------ > > <%@ Page Language="vb" %> > > <%@ Register TagPrefix="ASPNETSBS" TagName="Hello"
Src="Hello.ascx" %> > > > > <script runat="server"> > > Sub Page_Load(Sender As Object, E As EventArgs) > > MyHello.Name = "Andrew" > > MYHello.SayHello > > End Sub > > > > </script> > > <html> > > <head> > > </head> > > <body> > > <ASPNETSBS:Hello id="MyHello" runat="server" > > OnLoad="MyHello_Load"></ASPNETSBS:Hello> > > </body> > > </html> > > ------------------------------------------------------------- > > > > I am getting very frustrated... No matter what is after the "Sub" it > > won't > > continue past that point. I tried creating a GLOBAL.ASAX file,
and a > > WEB.CONFIG file, but to no avail... > > > > Any help would be appreciated. > > > > Please send replies to: ve*****@sympatico.ca > > > > Thanks a million! > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Feldman Alex |
last post by:
Hello friends.
Do anyone know wich C# api's should i use for recognizing removable/network
drives?
Example : I need to know when cd inserted to CD drive
Thank a lot
Alex
|
by: RWC |
last post by:
Hi Folks,
I have a windows 2000 server installation, IIS is running and the ASP.NET
1.1 SDK has been installed. I'm reading a book on ASP.NET and the lessons
call for the first line to read <%@...
|
by: Bob Day |
last post by:
Using VS 2003, Vb, MSDE...
Option 1 -------------------------------------------
Thread A and B are instantiations of 2 different classes. If thread A
raises an event caught by thread B, the...
|
by: Glenn Venzke |
last post by:
I'm using a ColdFusion app to consume a .NET webservice with 3 methods and
I'm running into a problem. The first time I added a web reference & compiled
the service (with VS.NET standard edition...
|
by: pointies |
last post by:
I am trying to work on "message center" for work and running into a
problem with a form
In the form, there is a checkbox, a textbox and a combobox
What I am trying to do is check to see if...
|
by: John Gonsalves |
last post by:
I'm experiencing problems related to IIS/ASP.NET not recognizing writes
to web.config that my web application performs.
Specifically I have a web application that provides an interface
allowing...
|
by: waynetheengineer |
last post by:
Hi,
I'm trying to write code for a form when it closes. It's supposed to requery a combo box depending on which form is currenlty open in the background behind the current form, shown below:
...
|
by: Brisingman |
last post by:
Hi,
I set PYTHONPATH to /home/me/bin in bash.bashrc, however the IDLE path
browser is not recognizing this. Not sure why.
Grateful for any insight.
Best
|
by: summerlw |
last post by:
Access 2003
VB 6.5
I'm attempted to run conditional formatting on a date field based on the value in another field. I've steped through this code and it is recognizing the values correct and is...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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: 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,...
| |