两次编译之间的解析器错误 [英] parser error in between compile time

查看:113
本文介绍了两次编译之间的解析器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解析器错误消息:此处不允许使用"comment.aspx.mail",因为它没有扩展类"System.Web.UI.Page"; ..

源错误:


Parser Error Message:''comment.aspx.mail''is not allowed here because it does not extend class ''System.Web.UI.Page'';.

Source Error:


Line 1:  <%@ Page Language="vb"; AutoEventWireup="false" CodeBehind="mail.aspx.vb" Inherits="comment.aspx.mail" %@>

Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



可能是什么错误?



what could be the error? and what steps i need to do to eliminate it?

推荐答案

Inherits属性用于指定页面的类名称,如以下示例所示:

Inherits attribute is used to specify a class name for the page, as in the following example:

<%@ Page language="C#" CodeFile="SamplePage.aspx.cs"

  Inherits="SamplePage" AutoEventWireup="true" %>



此类通常如下所示:



This class usually look like this:

public partial class SamplePage : System.Web.UI.Page
{
}



我的猜测是您缺少此部分SamplePage : System.Web.UI.Page



My guess is you are missing this part SamplePage : System.Web.UI.Page


这篇关于两次编译之间的解析器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆