简体   繁体   中英

Error - class does not extend System.Web.UI.Page

I have one error while compiling but it is strange because it did not move anywhere to happen.

The error is the following

'PaySimplex.FrontEnd.Pages.Operations.ParkingPayments.FinhishParking' is not allowed here because it does not extend class 'System.Web.UI.Page'.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FinhishParking.aspx.cs"           Inherits="PaySimplex.FrontEnd.Pages.Operations.ParkingPayments.FinhishParking" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Reference VirtualPath="~/Pages/Common/MovementsToolTip.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="operationsParkingPaymentsHead" runat="server">

...

Your code-behind page should look like this:

namespace PaySimplex.FrontEnd.Pages.Operations.ParkingPayments
{
    public partial class FinhishParking : System.Web.UI.Page
    {   
        // removed
    }
}

The FinhishParking class could also inherit from another class or classes that eventually inherit from System.Web.UI.Page

确保在您的FinhishParking.aspx.cs代码隐藏中,您继承的类是System.Web.UI.Page或者是继承自System.Web.UI.Page的类在其继承链中的某处。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM