ASP.NET Parser Error Cannot load code behind

后端 未结 2 1604
你的背包
你的背包 2021-01-05 02:02

Hey I am getting the following error

Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the

2条回答
  •  滥情空心
    2021-01-05 02:38

    Specify the namespace of the Inherits property of Page directive

    Look at codebehind of your page. It looks like:

    namespace MyWebSite
    {
         public partial class _AddToCart : System.Web.UI.Page 
         {
            //...
         }           
    }
    

    So you must change Page directive to:

    <%@ Page Language="C#" AutoEventWireup="true" Codebehind="AddToCart.aspx.cs" Inherits="MyWebSite._AddToCart" Title="Untitled Page" %>
    

提交回复
热议问题