Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 1.0
This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 22nd, 2004, 08:57 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch 16 -- compile error w/ components

I keep getting the following error:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30289: Statement cannot appear within a method body. End of method assumed.

Source Error:



Line 57: #End ExternalSource
Line 58:
Line 59: Public Sub New()
Line 60: MyBase.New
Line 61: Dim dependencies As System.Collections.ArrayList


Source File: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary ASP.NET Files\begaspnet\4f6b9c63\3003fd62\xv5yhavk.0.vb Line: 59

************************************************** ******************

I have the dll file in the bin folder under my app path -- BegASPNET\bin\MyFirstComponent.dll which was compiled with the following bat file:

CompileMyFirstComponent.bat
*********************

set indir=f:\BegASPNET\ch16\MyFirstComponent.vb
set outdir=f:\BegASPNET\bin\MyFirstComponent.dll

vbc /t:library /out:%outdir% %indir%
pause
***********************

here is my source code:

******************************************
Namespace WroxComponents
    Public Class HelloVB
        Public Function SayHello() as String
            Return "Hello World - I'm a VB.NET Component!"
        End Function
    End Class
End Namespace

********************************************

<%@Import Namespace="WroxComponents" %>

<html>
<head><title>My First Component</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
</head>
<body>
    Our component says: <br/><br/>

    <asp:Label ID="label1" Runat="server"/>

    <script language="vb" runat="server">
        Sub Page_Load(Source As Object, E as EventArgs)
                Dim VBComponent as New HelloVB()
                label1.text = VBComponent.SayHello()
    </script>


</body>
</html>

any help would be appreciated

Thanks
Chris





Similar Threads
Thread Thread Starter Forum Replies Last Post
Try it out:Ch 16 Dataset Example flhartley VB.NET 2002/2003 Basics 1 August 28th, 2009 07:00 AM
Ch 16 Try It Out doesn' t work + Fixes VictorVictor BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 December 12th, 2007 10:04 AM
Trouble viewing the forum (ch. 16) Draconian BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 3 August 26th, 2005 02:02 AM
Ch 16 driver not found dmswdev JSP Basics 1 June 27th, 2003 05:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.