如果没有“继承"属性,则无法使用"CodeFile"属性 [英] The 'CodeFile' attribute cannot be used without an 'Inherits' attribute
问题描述
我是刚开始构建.net应用程序,并且对此进行了很多研究,我正在尝试发布一系列asp.net网页,并一直在研究错误发生的原因并尝试了几种方法来停止错误.我走到了穷途末路..所以我得到两种错误类型:
I'm new to building .net applications and I have done alot of research on this, I'm trying to publish a series of asp.net web pages and having been researching why the error is appearing and trying several ways to stop the errors. I've come to a dead end..So I get two types of errors which are :
错误166如果没有'Inherits'属性,则无法使用'CodeFile'属性.C:\ Users \ Aj \ Code \ admin \ content.aspx 33
Error 166 The 'CodeFile' attribute cannot be used without an 'Inherits' attribute. C:\Users\Aj\Code\admin\content.aspx 33
和
错误148无法加载类型'MasterPage'.C:\ Users \ Aj \ Code \ admin \ content.aspx 2
Error 148 Could not load type 'MasterPage'. C:\Users\Aj\Code\admin\content.aspx 2
所标识的代码是:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="content.aspx.vb" Inherits="_content" MasterPageFile="../MasterPage.master" %>
<%@ MasterType TypeName="MasterPage" %>
主要说明:这是具有相同错误的许多文件之一,并且母版页文件位于父文件夹中.
Key note: This is one of many files which have the same error, and the master page file is in the parent folder.
推荐答案
看看输出,它将显示实际错误,而不是猜测为什么CodeFile错误.
Take a look for the output, it will show the real error instead of guess why CodeFile error.
这篇关于如果没有“继承"属性,则无法使用"CodeFile"属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!