Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 November 5th, 2010, 02:00 PM
Authorized User
 
Join Date: Feb 2010
Posts: 42
Thanks: 9
Thanked 0 Times in 0 Posts
Default Chapter 10, Page 359 - error?

In step 2 of the Try it Out on page 359:

"The Webmethod attribute won't be recognized directly. To fix this, type the following using or Imports statement at the top of the page, below the other statements:"

Shouldn't the phrase I put in bold be "above the other statements"?
 
Old November 5th, 2010, 02:06 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Nope; it's referring to the other Imports / using statements, not the entire code file.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old November 5th, 2010, 02:30 PM
Authorized User
 
Join Date: Feb 2010
Posts: 42
Thanks: 9
Thanked 0 Times in 0 Posts
Default

Imar,

At this point, my WebServices.aspx file has no other Import statements - this is the first one. I checked the file in the Source folder and it is the same.

Code:
Imports System.Web.Services

Partial Class Demos_WebServices
    Inherits BasePage

    <WebMethod()>
    Public Shared Function HelloWorld(ByVal yourName As String) As String
        Return String.Format("Hello {0}", yourName)
    End Function
End Class
 
Old November 5th, 2010, 02:42 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Ah, I see. VB has no default Imports by default. In C# you get a number of standard using statements in which you need to add them to that list. For VB, you're right, and it should read simply as "To the top of the file, add an Imports statement".

Thanks,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
demac3 (November 5th, 2010)
 
Old November 5th, 2010, 03:27 PM
Authorized User
 
Join Date: Feb 2010
Posts: 42
Thanks: 9
Thanked 0 Times in 0 Posts
Default

Thanks, Imar.

I've been working in the IT area for over 40 years. I have had to use a zillion text books. This one is clearly the best I've seen. Not only the way it was written, but also the support a reader has available - from the Source files to your responsiveness in P2P. I think I speak for many who are learning something new from this book, THANKS!
 
Old November 6th, 2010, 03:57 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You're welcome. It's good to hear you think my book is "the best of a zillion books" ;-)

Thanks,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Page 354 Chapter 10 tariq BOOK: Beginning ASP.NET 4 : in C# and VB 4 August 20th, 2010 10:33 AM
Chapter 10, Page 334 Saranjiv BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 July 20th, 2010 04:39 PM
Errata - Chapter 10, Page 377, C# RobC BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 October 3rd, 2006 02:26 AM
Ex 10, Chapter 5, page 253 Nick Y BOOK: Ivor Horton's Beginning Visual C++ 2005 1 June 16th, 2006 01:14 AM
Chapter 10, Try It Out error, page 380 VictorVictor BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 February 13th, 2006 12:41 PM





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