代码在Apache中出错 [英] code take error inAsp.net
本文介绍了代码在Apache中出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
错误1确保此代码文件中定义的类与'inherits'属性匹配,并且它扩展了正确的基类(例如Page或UserControl)。 E:\Experiments\WebSite8 \Default.aspx.cs 10
in asp。 net我们采取上面的错误如何解决它
Error 1 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). E:\Experiments\WebSite8\Default.aspx.cs 10
in asp. net we take above errro how to solve it
推荐答案
查看它引用的文件:Default.aspx.cs及其引用的行:第10行。
然后将类的定义与Default.aspx文件中的定义进行比较。
ASPX文件将在这些行中有一个标题:
Look at the file it refers to: "Default.aspx.cs" and the line it references: line 10.
Then compare the definition of the class against the definition in your Default.aspx file.
The ASPX file will have a header along these lines:
<%@ Page Title="" Language="C#" MasterPageFile="~/Resources/Masters/OverAllBasic.master"
AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
ASPX.CS文件应如下所示:
And the ASPX.CS file should look like this:
public partial class _Default : System.Web.UI.Page
名称必须匹配!
The names must match!
这篇关于代码在Apache中出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文