Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 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 February 23rd, 2006, 01:23 PM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 12 Web Method syntax

On page 439, the bottommost grey code: The <WebMethod()> _

As you can see, this line ends with an underscore.
Later on in Chapter 12 the underscore consistently appears, and if you omit it, you get prompted to put it back.

Can anyone tell me a bit about this new (to me) requirement? I'm new to Web Services. Does it mean 'continuation'?

Also, the underscore appears in the generated code as shown below, in the Try It Out on page 454.

<WebService(Namespace:="http://wroxunited.net/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicPr ofile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()> _

Thanks.

VictorVictor


 
Old February 23rd, 2006, 01:35 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

The underscore is just a line continuation character. Web Service attributes (in fact all attributes in VB.NET) should be placed right before the method or class they apply to.

So, this:
<Services.WebService(Namespace:="http://wroxunited.net/")> YourClass

is functionally equivalent to

<Services.WebService(Namespace:="http://wroxunited.net/")> _
YourClass

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old February 23rd, 2006, 01:46 PM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Imar.
I figured as much as it all compiles and work fine.
Would have been nice somewhere to make a comment or
two about the use of the continuation character.

VV







Similar Threads
Thread Thread Starter Forum Replies Last Post
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM
Chapter 12, C#, UpdateScore Web Service skafando BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 October 24th, 2006 12:02 PM
Errors on Chapter 12 example(12.8) sonnie ASP.NET 2.0 Professional 2 June 7th, 2006 10:55 AM
Chapter 12 Koga VB.NET 2002/2003 Basics 0 November 2nd, 2004 11:43 PM





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