Wrox Programmer Forums
|
All Other Wrox Books Do you have a question about a Wrox book that isn't listed anywhere on p2p.wrox.com or where the forum is locked? Here's a forum to post questions about any other Wrox book so that other readers or one of the authors can help you with your questions. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the All Other Wrox Books 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
  #1 (permalink)  
Old July 13th, 2003, 08:59 PM
ssr ssr is offline
Registered User
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exercise ch2, page 82

When running the program I receive a compilation error on a program that must be running in the background:

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

Source Error:



Line 62: #End ExternalSource
Line 63:
Line 64: Public Sub New()
Line 65: MyBase.New
Line 66: Dim dependencies As System.Collections.ArrayList


Source File: C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Tempora ry ASP.NET Files\begaspnet\edd8da2e\58d5007\wkoyjdue.0.vb Line: 64

Not sure how to get past this.

Thank you.
Sharon
  #2 (permalink)  
Old July 13th, 2003, 09:02 PM
ssr ssr is offline
Registered User
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This question is for Beginning ASP.NET with VB. ISBN number
0-7645-4369-5
  #3 (permalink)  
Old September 10th, 2003, 03:42 AM
Authorized User
 
Join Date: Jul 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

The code fails because there is no End Sub specified. Amend the code like so

<script runat="server" language="vb">
    Sub Page_Load()
    Message1.Text = " "
    Message2.Text = " "
    Message3.Text = " "

    if text1.Text <> " " Then
        Message1.Text = "You have entered in the following name: " + text1.Text
    end if


    if text2.Text <> " " Then
        message2.Text = "You have entered in the following address: " + text2.Text
    end if


    if text3.Text <> " " Then
        Message3.Text = "You have entered in the following password: " + text3.Text
    end if
End Sub <<<<---- NOTE THE END SUB

Hope this helps!






Similar Threads
Thread Thread Starter Forum Replies Last Post
CH2 p54-55 parse error. nodster BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 July 25th, 2007 11:16 AM
Ch2 52-54--passing session variables dprice BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 September 26th, 2005 07:01 AM





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