Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : 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 7th, 2016, 12:06 PM
Registered User
 
Join Date: Nov 2016
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 6 Creating a Base Page Stuck

Hi there, I am stuck at Page 210 step 6 when the exercise ask us to inherit basepage for all our pages in our site. Initially I changed Login.aspx page to inherit BasePage, it worked fine, I can see that exception when there is no title on the Login.aspx page. I then changed Default.aspx and Frontend.master to inherit BasePage. After I have done it, I can't view all my pages at the browser. I have even entered the title of the pages but i still get the following error. I have tried to undo the BasePage steps but I still get the following error.

I keep getting the following error, please help.

Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).

Source Error:


Line 1:
Line 2: Partial Class MasterPages_Frontend
Line 3: Inherits System.Web.UI.Page
Line 4: End Class

Source File: C:\BegASPNET\Site\MasterPages\Frontend.master.vb Line: 2
 
Old November 7th, 2016, 04:33 PM
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,

You shouldn't have changed the base class for the master pages, only for content pages. Change it back to System.Web.UI.MasterPage on the master page and it should work again.

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
Chapter 13 page 467 Try it out #6...Stuck Ansieone BOOK: Beginning ASP.NET 4.5 : in C# and VB 3 June 4th, 2014 02:39 PM
Chapter 6: Base page Antonius Block BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 August 6th, 2012 04:40 AM
Creating a base page confusion Kerblamalot ASP.NET 3.5 Basics 4 February 3rd, 2010 04:16 AM
Stuck on chapter 4 page 87. misheck BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 2 January 10th, 2010 12:34 PM





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