【发布时间】:2017-05-03 20:33:47
【问题描述】:
我有一个非常简单(当前)的 1 页 aspx 网站。它无法使用我以前从未见过的消息进行编译。所有其他示例似乎都引用了母版页,而我没有。
“解析器错误消息:此处不允许‘Options.WebForm1’,因为它没有扩展类‘System.Web.UI.Page’。
源错误:
第 1 行:
第 2 行:
第 3 行:
这是 Default.aspx 的顶部
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="Options.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
对于 Default.aspx.cs
namespace Options
{
public partial class _Default : Page
{
【问题讨论】:
-
Inherits="Options.WebForm1"不应该是Inherits="Options._Default"?