Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics 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 January 26th, 2010, 01:03 PM
Registered User
 
Join Date: Jan 2010
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Creating a base page confusion

Hello Everyone

I am currently trying to create a base page, following the second "Try it out" exersice.

I have followed all the steps but I seem to have made a mistake. I replaced all the System.Web.UI.Page to BasePage using the Find and Replace utility, and saved all the changes. When I launch the browser page 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: CS0246: The type or namespace name 'BasePage' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 6: using System.Web.UI.WebControls;
Line 7:
Line 8: public partial class _Default : BasePage
Line 9: {
Line 10: protected void Page_Load(object sender, EventArgs e)


Source File: c:\BegASPNET\Site\Default.aspx.cs Line: 8

I'm confused as to what I have done wrong and have completely no idea how to fix this. I feel that I am a little out of my leauge. I would be greatful for any advice.
 
Old January 26th, 2010, 01:44 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,

Is this about my book Beginning ASP.NET 3.5 in C# and VB? If so, you're better off posting these kind of questions in its own forum, located here: http://p2p.wrox.com/book-beginning-a...0-18759-3-389/

That said, did you place the BasePage in its own namespace? And are you sure you are using a Web Site Project and not a Web Application Project (do you have 1 or two code behind files for each page?) Where did you store the BasePage.cs file ad how does its code look?

if you provide more info, I am sure we can work this out.

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!
 
Old January 26th, 2010, 01:57 PM
Registered User
 
Join Date: Jan 2010
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hello Imar

Yes this is from your book "Beggining ASP.NET 3.5 In C# and VB" Sorry I posted in the wrong forum. I will supply the information needed on the link you posted.

*edit*

Actually I will be starting over again. I dont think I was picking up on what you was explaining in the book as I find it difficult to learn by paper. It's embarresing to admit that I dont understand how to explain nor answer your questions.

Thanks for your time

Steve

Last edited by Kerblamalot; January 26th, 2010 at 02:25 PM..
 
Old January 26th, 2010, 02:16 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

No problem. You can continue here for now, or start over in the other forum.

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!

Last edited by Imar; January 26th, 2010 at 04:09 PM..
The Following User Says Thank You to Imar For This Useful Post:
Kerblamalot (January 26th, 2010)
 
Old February 3rd, 2010, 04:16 AM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to nalla Send a message via Yahoo to nalla
Default

Hi,
Most probable reason for this error must be because your BasePage is not deriving from System.Web.UI.Page

Cheers
__________________
nalaka hewage
http://nalakahewage.blogspot.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with creating a base conversion program sparxxxx C++ Programming 1 April 11th, 2008 03:27 PM
Creating Access Data Base file using VS 2005 wjbauer BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 1 November 3rd, 2007 04:40 AM
VB.net 2K3 Ch. 5 Confusion page 150 ralphtrent BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 5 June 9th, 2004 12:30 PM





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