【发布时间】:2014-07-04 13:12:36
【问题描述】:
我有一个需要从存储在“App_Web_yht1mma2”文件夹中的类 (MasterPage2.cs) 继承的母版页。
在母版页中,我将代码设置为:
<%@ Master Language="C#" AutoEventWireup="true" Inherits="MasterPage2,App_Web_yht1mma2" %>
当我调试此页面时,我收到以下错误:
解析器错误 说明:解析服务此请求所需的资源时出错。请查看以下特定的解析错误详细信息并适当修改您的源文件。
Parser Error Message: Could not load the assembly 'App_Web_yht1mma2'. Make sure that it is compiled before accessing the page.
Source Error:
Line 1: <%@ Master Language="C#" AutoEventWireup="true" Inherits="MasterPage2,App_Web_yht1mma2" %>
Line 2:
Line 3:
Source File: /MasterPage.master Line: 1
请告诉我如何纠正这个错误。
【问题讨论】:
-
构建解决方案,修复编译错误。
-
谢谢...错误表明它无法加载程序集。
-
您是否构建了项目并检查了编译器错误?
-
是的,我做到了,除了警告之外,我仍然收到此错误“解析器错误消息:无法加载程序集 'App_Web_yht1mma2'。请确保在访问页面之前对其进行编译。”
-
你得到的解析器错误是最终结果。您需要修复根本原因,以便您的
App_Web_yht1mma2编译。为此,您需要修复编译时错误和警告。
标签: c# master-pages