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 > BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 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 Display Modes
  #1 (permalink)  
Old June 10th, 2009, 01:09 PM
Registered User
 
Join Date: Jun 2009
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Default chapter two ...because it does not extend class 'System.Web.UI.Page'

Hello Everyone,

I try to run the example of adding records, and my browser tell me:

'Webform1 'is not a valid base class because it does not extend class 'System.Web.UI.Page'

my code is:

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace V2.PaidTimeOffDAL
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
}

And the other code is

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebForm1" %>


I don't understand why I get this error... can anyone help me please... thanks.
Reply With Quote
  #2 (permalink)  
Old June 10th, 2009, 01:30 PM
Authorized User
 
Join Date: Jun 2009
Posts: 11
Thanks: 1
Thanked 2 Times in 2 Posts
Default

add this to the top of the page:

using V2.PaidTimeOffDAL;
Reply With Quote
The Following User Says Thank You to GenXisT For This Useful Post:
andres.gonzalez (June 10th, 2009)
  #3 (permalink)  
Old June 10th, 2009, 03:28 PM
Imar's Avatar
Wrox Author
Points: 67,317, Level: 100
Points: 67,317, Level: 100 Points: 67,317, Level: 100 Points: 67,317, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,230
Thanks: 66
Thanked 1,416 Times in 1,396 Posts
Default

Or change the inherits statement to:

Inherits="V2.PaidTimeOffDAL.WebForm1"

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:
andres.gonzalez (June 10th, 2009)
  #4 (permalink)  
Old June 11th, 2009, 09:38 AM
Registered User
 
Join Date: Jun 2009
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hello again,

the problem has been solved, add missing reference to data layer and change the inherits statement.

very thanks...

Andres Gonzalez
Reply With Quote
Reply


Thread Tools
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
Mobile Control in System.Web.UI.Page hpfarstad ASP.NET 2.0 Professional 0 August 28th, 2006 05:00 AM
No System.Web.UI alexanderH BOOK: ASP.NET Website Programming Problem-Design-Solution 2 March 10th, 2005 02:04 AM
namespace System.Web.UI henninga BOOK: ASP.NET Website Programming Problem-Design-Solution 9 November 16th, 2004 02:51 PM
Subclassing system.web.ui.page gazeth BOOK: ASP.NET Website Programming Problem-Design-Solution 2 May 25th, 2004 10:02 AM



All times are GMT -4. The time now is 12:26 AM.


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