我一直在做這個小時,它不斷出現相同的錯誤。我不知道爲什麼!我設法爲masterpage創建了第一個webform。不知何故,後續webforms獲得相同的錯誤。使用母版頁創建網頁表格
這是我創造的Web窗體:
<%@ Page Title="" Language="C#" MasterPageFile="~/EIDShopMain.Master" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="mainWebsite_EID_Shop_.WebForm3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
,當我想在瀏覽器中查看:
Server Error in '/' Application.
Parser Error Description: 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: Could not load type 'mainWebsite_EID_Shop_.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="mainWebsite_EID_Shop_.Global" Language="C#" %>
更新:這是一個ASP.Net Web應用程序項目。
WebForm3的代碼隱藏:
namespace mainWebsite_EID_Shop_
{
public partial class WebForm3 : Page
{
}
}
任何人都可以解釋爲什麼某個網頁表格的作品和有時它不工作。
UPDATE2:多個錯誤:
Parser Error Description: 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: Could not load type 'mainWebsite_EID_Shop_.EIDShopMain'.
Source Error:
Line 1: <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="EIDShopMain.master.cs" Inherits="mainWebsite_EID_Shop_.EIDShopMain" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;
是它Web應用程序項目或Web站點項目? – abatishchev
也請發佈您的代碼隱藏文件。 – abatishchev
正如你所看到的,錯誤是在Global.asax中,而不是WebForm3.aspx – abatishchev