Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 October 25th, 2006, 10:45 PM
Authorized User
 
Join Date: Oct 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chap 2 - Template.master.cs

Please help as I've been retyping for hours.

I get the following error:

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 13: {
Line 14:
Line 15: public partial class TemplateMaster : System.Web.UI.MasterPage
Line 16: {
Line 17: protected void Page_Load(object sender, EventArgs e)


Source File: c:\DTII\WebSite\DTII_Web\Template.master.cs Line: 15

Here's what my Template.master.cs has:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


namespace MB.DTII_Web.UI
{

    public partial class TemplateMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }

}

What the heck am I missing? I noticed that there isnt a :

using System.Web.UI.MasterPage nor a System.Web.UI.Content

Please help




 
Old October 25th, 2006, 10:55 PM
Authorized User
 
Join Date: Oct 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry all, figured out my own problem.

In case you get stuck, dont use;

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Template.master.cs" Inherits="TemplateMaster" %>

Instead use:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Template.master.cs" Inherits="MB.TheBeerHouse.UI.TemplateMaster" %>








Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 7 Object reference error in master.cs mikeal_a BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 4 September 5th, 2008 07:19 AM
User object in Master Page template? lancer ASP.NET 2.0 Basics 0 June 22nd, 2006 01:32 PM
Sortable DataGrid within Master Pages template jtoth ASP.NET 1.x and 2.0 Application Design 0 April 13th, 2005 01:46 PM
Enums.cs allanhu BOOK: ASP.NET Website Programming Problem-Design-Solution 3 November 2nd, 2004 10:37 PM





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