Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 March 14th, 2009, 09:38 AM
Authorized User
 
Join Date: Feb 2009
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Imar and Doug, now I understand a little better.

What does this line of code do?

Else
lblResult.Text = String.Empty

Do I still need this?
 
Old March 14th, 2009, 09:44 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It sets the Text to an empty string, effectively clearing the label. You may need it to clear any (good or bad) result from a previous postback.

Cheers,

Imar
---------------------------------------------------------------------------------------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
While typing this post, I was listening to: Special Cases by Massive Attack (Track 4 from the album: 100th Window) What's This?
 
Old January 11th, 2010, 12:58 AM
Registered User
 
Join Date: Dec 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Angry myCalculator on page 170

Hi there,
I am actually lost.
on page 170 on C# here is new myCalculator thing.
Did I miss it somewhere else? I can not see this myCalculator anywhere else before.
if it is there could you please show me. because of it, code is not working.
thank you
 
Old January 11th, 2010, 06:09 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

The Caluclator is instantiated on the very first line at page 170 (C#) or at page 169 (VB):

VB
Dim myCalculator As New Calculator()

C#
Calculator myCalculator = new Calculator();

The Calculator class itself is shown at page 168 (created in step 4 of the Try It Out).

So, I am not sure what exactly you're missing.

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
Try...Catch lowell VB.NET 3 July 23rd, 2007 06:35 AM
catch the alerts catchrohith Classic ASP Basics 1 October 26th, 2006 06:39 AM
Try Catch not working?? dparsons ASP.NET 1.0 and 1.1 Professional 3 September 18th, 2006 06:54 PM
Try and Catch? mujju PHP How-To 2 January 20th, 2005 12:27 PM
How to catch error. lancet2003 BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 December 3rd, 2003 02:16 PM





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