短篇小说。 这个网站是由我的一个朋友创建的,他不知道那么多C#或asp。并且首先在VS 2k3中创建。当我把它转化为VS 2K8这些错误开始突然出现,也有与编制等问题,我设法理清(似乎被释放到VS 2K8想设计文件)解析器错误消息:文件'/TestSite/Default.aspx.cs'不存在
错误信息得到:
An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The file '/TestSite/Default.aspx.cs' does not exist.
Source Error:
Line 1:
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="GuildStats._Default" %>
Line 2:
Line 3:
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
Defaults.aspx.cs
namespace GuildStats
{
public partial class _Default : System.Web.UI.Page
{
Defaults.aspx
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="GuildStats._Default" %>
Site.master.cs
namespace GuildStats
{
public partial class Site : System.Web.UI.MasterPage { }
}
的Site.Master
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="GuildStats.Site" %>
该链接如何解决此问题?它提到了CodeFile属性,但没有提到CodeBehind。 MSDN文档声明CodeBehind已经过时,所以我试图找出为什么切换回CodeBehind是一个解决方案。 – 2009-10-16 17:49:59