Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 17th, 2010, 09:48 AM
Authorized User
Points: 267, Level: 5
Points: 267, Level: 5 Points: 267, Level: 5 Points: 267, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 56
Thanks: 17
Thanked 2 Times in 2 Posts
Default Ch9 Page 303 - Build error

When I get to step 10 and press Ctrl+F5 I get the following build error.


Error 1 '_$safeitemnames$' is not a valid value for attribute 'inherits'. C:\BegASPNET\Site\MyBasePage.aspx 1

Here is the code for MyBasePage - it looks to be the sames as that in the download.

Note: The "_$safeitemnames$" in the code behind has a red underline with the error message: "The type or namespace 'safeitemnames' could not be found."


Any clues?

Thanks
Ken

Code:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Frontend.master" AutoEventWireup="true" CodeFile="MyBasePage.aspx.cs" Inherits="_$safeitemnames$" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
</asp:Content>
and the code behind
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _$safeitemnames$: BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}
the complete error list
Code:
Error	1	'_$safeitemnames$' is not a valid value for attribute 'inherits'.	C:\BegASPNET\Site\MyBasePage.aspx	1	
Error	5	{ expected	C:\BegASPNET\Site\MyBasePage.aspx.cs	8	23	C:\BegASPNET\Site\
Error	4	Invalid token '$' in class, struct, or interface member declaration	C:\BegASPNET\Site\MyBasePage.aspx.cs	8	23	C:\BegASPNET\Site\
Error	6	Invalid token '$' in class, struct, or interface member declaration	C:\BegASPNET\Site\MyBasePage.aspx.cs	8	37	C:\BegASPNET\Site\
Error	7	Invalid token '{' in class, struct, or interface member declaration	C:\BegASPNET\Site\MyBasePage.aspx.cs	9	1	C:\BegASPNET\Site\
Error	8	The type or namespace name 'safeitemnames' could not be found (are you missing a using directive or an assembly reference?)	C:\BegASPNET\Site\MyBasePage.aspx.cs	8	24	C:\BegASPNET\Site\
Error	2	Unexpected character '$'	C:\BegASPNET\Site\MyBasePage.aspx.cs	8	23	C:\BegASPNET\Site\
Error	3	Unexpected character '$'	C:\BegASPNET\Site\MyBasePage.aspx.cs	8	37	C:\BegASPNET\Site\

Last edited by ken evans; October 17th, 2010 at 09:51 AM.. Reason: more errors
Reply With Quote
  #2 (permalink)  
Old October 17th, 2010, 09:56 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Is this the page you used as the basis for the new template? If so, you can delete it as instructed in the book.

If this page is the *result* of your new template (e.g. when you choose Add New Item), something is wrong with the template file.

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!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
ken evans (October 17th, 2010)
  #3 (permalink)  
Old October 17th, 2010, 10:12 AM
Authorized User
Points: 267, Level: 5
Points: 267, Level: 5 Points: 267, Level: 5 Points: 267, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 56
Thanks: 17
Thanked 2 Times in 2 Posts
Default

OK, I deleted MyBasePage and the error has gone away.
Thanks
Ken
Reply With Quote
Reply


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
Build Error venessaz BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2 46 March 30th, 2016 12:25 PM
Error in Monthly Calendar Report (Ch9) mruschetti BOOK: Expert Access 2007 Programming ISBN 978-0-470-17402-9 6 May 7th, 2008 11:43 PM
CH9 - Apache not using custom error page d2nash BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 3 June 20th, 2006 11:25 AM
Build a page dynamically jbenson001 ASP.NET 1.x and 2.0 Application Design 13 June 20th, 2005 12:12 PM
error on build stewbaby C++ Programming 1 October 30th, 2003 06:07 PM



All times are GMT -4. The time now is 11:38 PM.


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