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 November 10th, 2009, 12:43 PM
Authorized User
 
Join Date: Jun 2009
Posts: 70
Thanks: 18
Thanked 1 Time in 1 Post
Default Am I understanding how the BasePage is called up?

I am wondering if I fully understand how the Base Page is called up.

I have installed a file BasePage.vb (not the same coding as the book's) in the App_Code folder. I am running a file called test.aspx. It's code behind is
Code:
Partial Class test
    Inherits BasePage

End Class
There is a MasterPage, for which the code behind is:

Code:
 
Partial Class MasterPage
    Inherits System.Web.UI.MasterPage
End Class
Now as I understand Chapter 6, that should mean that running test.aspx will call up the BasePage which will over ride System.Web.UI.Page - is that correct?

In which case, if I get an error "Error parsing attribute 'meta_keywords': Type 'System.Web.UI.Page' does not have a public property named 'meta_keywords'." am I right in deducing that the BasePage has not the coding that includes the public property for 'meta_keywords', and so does not over ride System.Web.UI.Page?.

I am not asking for this one to be solved here - just asking if I have understood the book correctly, and so have made the correct deduction.
 
Old November 10th, 2009, 01:46 PM
Authorized User
 
Join Date: Jun 2009
Posts: 70
Thanks: 18
Thanked 1 Time in 1 Post
Default

I have figured this one out. Quite a mess of errors - now eliminated.

@ Page was incomplete, as was test.vb, which should have been

Code:
Imports System
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Partial Class test
    Inherits BasePage

End Class
I wonder, though, if those Imports lines are not implicit anyway - will play with that when I get time.

For those who are interested, what I was working on was allowing meta tags.
 
Old November 11th, 2009, 04: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

Glad you figured it out...

I think you'll be happy to hear that in ASP.NET 4 Microsoft is introducing Page.MetaKeywords and Page.MetaDescription:

http://msdn.microsoft.com/en-us/libr...n(VS.100).aspx

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!
The Following User Says Thank You to Imar For This Useful Post:
kiwibrit (November 11th, 2009)
 
Old November 11th, 2009, 05:08 AM
Authorized User
 
Join Date: Jun 2009
Posts: 70
Thanks: 18
Thanked 1 Time in 1 Post
Default

That looks rather neat - thanks for the link.





Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 6 p226 preferred theme in basepage robbaralla BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 November 7th, 2009 11:24 AM
Reference to BasePage member4953 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 March 27th, 2009 01:45 PM
BasePage & MasterPage Rachel BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 December 25th, 2008 11:23 AM
BasePage Code for VB (Chapter 6) justinjones06 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 September 15th, 2008 01:50 AM
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





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