Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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 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.
  #2 (permalink)  
Old January 26th, 2010, 01:44 PM
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

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!
  #3 (permalink)  
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..
  #4 (permalink)  
Old January 26th, 2010, 02:16 PM
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

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)
  #5 (permalink)  
Old February 3rd, 2010, 04:16 AM
Friend of Wrox
Points: 464, Level: 7
Points: 464, Level: 7 Points: 464, Level: 7 Points: 464, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2005
Location: Colombo, , Sri Lanka.
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
 


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
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



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


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