p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio (http://p2p.wrox.com/book-asp-net-3-5-enterprise-application-development-visual-studio-2008-problem-design-solutio-477/)
-   -   chapter two ...because it does not extend class 'System.Web.UI.Page' (http://p2p.wrox.com/book-asp-net-3-5-enterprise-application-development-visual-studio-2008-problem-design-solutio/74732-chapter-two-because-does-not-extend-class-system-web-ui-page.html)

andres.gonzalez June 10th, 2009 02:09 PM

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.

GenXisT June 10th, 2009 02:30 PM

add this to the top of the page:

using V2.PaidTimeOffDAL;

Imar June 10th, 2009 04:28 PM

Or change the inherits statement to:

Inherits="V2.PaidTimeOffDAL.WebForm1"

Cheers,

Imar

andres.gonzalez June 11th, 2009 10:38 AM

Hello again,

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

very thanks...

Andres Gonzalez

ptn_sys@yahoo.com September 25th, 2016 10:07 PM

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


All times are GMT -4. The time now is 04:58 AM.

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