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 September 14th, 2008, 05:45 PM
Registered User
 
Join Date: Sep 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to justinjones06
Default BasePage Code for VB (Chapter 6)

First post here, Really enjoying the book.


I run Vista 64 and noticed that when I added the "
If Me.Title = "Untitled Page" Then"
Code that is supplied on Page 206, the error message did not come up. I figured out that the pages were not being named "Untitled Page" and the title had "" no entry.
I just added "ElseIf Me.Title = "" then"
to the statement and that produced the error for these pages.

Just wanted to pass that along. I am not sure if that is a Vista quirk or what, but I thought that may be useful to others.
 
Old September 15th, 2008, 01:50 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 Justin,

I think this is a Service Pack 1 issue. Before SP1 (the RTM of VS 2008), new pages were titled "Untitled Page". Now, when you apply SP1, pages are titled "" by default. Your fix works, although you could also simply use an Or:
Code:
If Me.Title = "Untitled Page" Or String.IsNullOrEmpty(Me.Title) Then
  Throw New Exception("Page title cannot be ""Untitled Page"" or an ampty string.")
End If
Hope this helps,

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
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I write this vb 6 code to work in vb 2008? sanderson Visual Basic 2008 Essentials 3 June 10th, 2008 01:46 PM
BasePage and Namespace Issue Eric S. Smith BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 May 28th, 2008 08:43 AM
Urgent:hard disk serial code and vb code ivanlaw Pro VB 6 0 July 25th, 2007 04:05 AM
VB: .Exe file, serial code and activation code ivanlaw Pro VB 6 8 July 6th, 2007 05:44 AM





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