Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Trouble compiling HelloWorld with vbc

Reply
Thread Tools

Trouble compiling HelloWorld with vbc

 
 
Mister.programmer
Guest
Posts: n/a
 
      02-10-2005
Hi,

I can't compile anything with vbc, so i am asking for help please.

I have a file helloworld.aspx written in asp.net using vb, here it is:



<script runat="server" language="vb">
'================================================= ============================
'================================================= ============================
' HelloWorld.aspx
'================================================= ============================
'================================================= ============================


' ================================================== ===
' Begin
' ================================================== ===

Private Sub Page_Load()
' Print "Hello World !"
Response.write ("Hello World !")
End Sub
' ================================================== ===
' End
' ================================================== ===

</script>



Then i have a file compilehelloworld.bat, here it is:



C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.e xe helloworld.aspx
/target:library /out:helloworld.dll /reference:System.dll > comp.log



The file helloworld.aspx works great when i don't compile it, but when
i execute compilehelloworld.bat, here is the result:



Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.

D:\dev\jct\source\helloworld.aspx(1) : error BC30636: '>' expected.

<script runat="server" language="vb">
~~~~~
D:\dev\jct\source\helloworld.aspx(13) : error BC30001: Statement is
not valid in a namespace.

Private Sub Page_Load()
~~~~~~~~~~~~~~~~~~~~~~~
D:\dev\jct\source\helloworld.aspx(21) : error BC30203: Identifier
expected.

</script>
~


Can anyone tell me what is wrong ? Thanks.
 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      02-10-2005
You should use "code behind" if you do this. For now you can't compile ASPX
page, they are compiled on the fly and are pre-processed before compilation
(for example <script> is not part of the VB.NET language).

Patrice

--

"Mister.programmer" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed) om...
> Hi,
>
> I can't compile anything with vbc, so i am asking for help please.
>
> I have a file helloworld.aspx written in asp.net using vb, here it is:
>
>
>
> <script runat="server" language="vb">
>

'================================================= ==========================
==
>

'================================================= ==========================
==
> ' HelloWorld.aspx
>

'================================================= ==========================
==
>

'================================================= ==========================
==
>
>
> ' ================================================== ===
> ' Begin
> ' ================================================== ===
>
> Private Sub Page_Load()
> ' Print "Hello World !"
> Response.write ("Hello World !")
> End Sub
> ' ================================================== ===
> ' End
> ' ================================================== ===
>
> </script>
>
>
>
> Then i have a file compilehelloworld.bat, here it is:
>
>
>
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.e xe helloworld.aspx
> /target:library /out:helloworld.dll /reference:System.dll > comp.log
>
>
>
> The file helloworld.aspx works great when i don't compile it, but when
> i execute compilehelloworld.bat, here is the result:
>
>
>
> Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
> for Microsoft (R) .NET Framework version 1.1.4322.573
> Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
>
> D:\dev\jct\source\helloworld.aspx(1) : error BC30636: '>' expected.
>
> <script runat="server" language="vb">
> ~~~~~
> D:\dev\jct\source\helloworld.aspx(13) : error BC30001: Statement is
> not valid in a namespace.
>
> Private Sub Page_Load()
> ~~~~~~~~~~~~~~~~~~~~~~~
> D:\dev\jct\source\helloworld.aspx(21) : error BC30203: Identifier
> expected.
>
> </script>
> ~
>
>
> Can anyone tell me what is wrong ? Thanks.



 
Reply With Quote
 
 
 
 
mister.mwa@laposte.net
Guest
Posts: n/a
 
      02-10-2005

Patrice wrote:
> You should use "code behind" if you do this. For now you can't

compile ASPX
> page, they are compiled on the fly and are pre-processed before

compilation
> (for example <script> is not part of the VB.NET language).
>
> Patrice
>


Thank you for this information. Could you give me the equivalent in
"code behind" for this helloworld.aspx and compilehelloworld.bat ?

Thanks.

 
Reply With Quote
 
mister.mwa@laposte.net
Guest
Posts: n/a
 
      02-11-2005
Me again: For anyone having the same question and coming to this
thread, here is a good link.

http://www.samspublishing.com/articl...le.asp?p=25468

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling With VBC RN1 ASP .Net 3 03-17-2008 12:17 AM
helloworld portlet gluraski Java 0 06-09-2005 09:10 AM
Tomcat running under apache/mod-jk hangs after calling HelloWorld servlet exactly 9 times Java 0 01-18-2004 01:24 PM
Cannot run 'HelloWorld' servlet in Tomcat environment the_JAVA_Rookie Java 5 08-19-2003 12:19 PM
Compiling a ASP.NET project on the server with vbc.exe Brian B. ASP .Net 4 07-02-2003 07:54 AM



Advertisments