我在编译时遇到一个错误,但它很奇怪,因为它没有移动到任何地方。
错误如下
此处不允许'PaySimplex.FrontEnd.Pages.Operations.ParkingPayments.FinhishParking',因为它不会扩展类'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">
<title>paySimplex</title>
<script src="../../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="../../../Scripts/jquery-ui-1.8.20.custom.min.js" type="text/javascript"></script>
<link href="../../../DefaultStyle.css" rel="stylesheet" type="text/css" />
<link href="Finish.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="accountsMovementsForm" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release" LoadScriptsBeforeUI="true" />
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="5">
</telerik:RadAjaxLoadingPanel>
<div id="mainGrid">`
...
谢谢
答案 0 :(得分:2)
您的代码隐藏页面应如下所示:
namespace PaySimplex.FrontEnd.Pages.Operations.ParkingPayments
{
public partial class FinhishParking : System.Web.UI.Page
{
// removed
}
}
FinhishParking
类也可以继承自最终从System.Web.UI.Page
继承的另一个或多个类
答案 1 :(得分:0)
在FinhishParking.aspx.cs
的代码隐藏中确保您继承的类是System.Web.UI.Page
,或者是在其继承链中某处继承自System.Web.UI.Page
的类。