Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 25th, 2006, 10:45 PM
Authorized User
 
Join Date: Oct 2006
Location: , Georgia, USA.
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




  #2 (permalink)  
Old October 25th, 2006, 10:55 PM
Authorized User
 
Join Date: Oct 2006
Location: , Georgia, USA.
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" %>



 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:51 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.