CodeFileBaseClass 属性
生活随笔
收集整理的這篇文章主要介紹了
CodeFileBaseClass 属性
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
asp.net 2.0 中,今天遇到了一個錯誤:
Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl)
原因是我的 CodeBehind 類繼承了自定義的頁面基類。按理以往也不該出錯的,查了下 google:
http://forums.asp.net/t/941553.aspx
解決辦法是:在 aspx 的 Page 指示節中加一個 CodeFileBaseClass 屬性指名自定義的頁面基類。
例如:
<%@?Page?Language="C#"?AutoEventWireup="true"?
????Inherits="ZbUrbanPlanning.Web.admin.AddressBook.OrgManage"?
????CodeFile="OrgManage.aspx.cs"
????CodeFileBaseClass="ZbUrbanPlanning.Web.PageBase"?%>
Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl)
原因是我的 CodeBehind 類繼承了自定義的頁面基類。按理以往也不該出錯的,查了下 google:
http://forums.asp.net/t/941553.aspx
解決辦法是:在 aspx 的 Page 指示節中加一個 CodeFileBaseClass 屬性指名自定義的頁面基類。
例如:
<%@?Page?Language="C#"?AutoEventWireup="true"?
????Inherits="ZbUrbanPlanning.Web.admin.AddressBook.OrgManage"?
????CodeFile="OrgManage.aspx.cs"
????CodeFileBaseClass="ZbUrbanPlanning.Web.PageBase"?%>
轉載于:https://www.cnblogs.com/RChen/archive/2007/07/13/aspnet_issue.html
總結
以上是生活随笔為你收集整理的CodeFileBaseClass 属性的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 菲氏微积分与Keisler微积分:两个不
- 下一篇: 《商务与经济统计》学习笔记(一)---数