Wrox Programmer Forums
|
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 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 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.
 
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;
The Following User Says Thank You to GenXisT For This Useful Post:
andres.gonzalez (June 10th, 2009)
 
Old June 10th, 2009, 03:28 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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!
The Following User Says Thank You to Imar For This Useful Post:
andres.gonzalez (June 10th, 2009)
 
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
 
Old September 25th, 2016, 09:07 PM
Registered User
 
Join Date: Sep 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Andrew,

Do you mind stating what you did to solve the problem? I have the same error message and at lost as what to do to get rid of it





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 03:04 AM
namespace System.Web.UI henninga BOOK: ASP.NET Website Programming Problem-Design-Solution 9 November 16th, 2004 03:51 PM
Subclassing system.web.ui.page gazeth BOOK: ASP.NET Website Programming Problem-Design-Solution 2 May 25th, 2004 10:02 AM





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