Reputation: 421
I have searched through Stackoverflow, Google, and tried different configurations like CodeFile rather than CodeBehind. The error changes slightly but still get it, really stuck on this one. Any help will be appreciated. The exact error is below, my code for that error is below that.
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 'BestPricingEngine.Main'.
Source Error:
Line 1: <%@ Page Title="Import FBA Orders" Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPages/MasterPage.Master" CodeBehind="ImportFBAOrders.cs" Inherits="BestPricingEngine.Main" %> Line 2: <%@ Register src="ImportFBAOrders.ascx" tagname="ImportFBAOrders" tagprefix="ucImportFBAOrders"%> Line 3:
Source File: /Pages/ImportFBAOrders/ImportFBAOrders.aspx Line: 1
<%@ Page Title="Import FBA Orders" Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPages/MasterPage.Master" CodeBehind="ImportFBAOrders.cs" Inherits="BestPricingEngine.Main" %>
<%@ Register src="ImportFBAOrders.ascx" tagname="ImportFBAOrders" tagprefix="ucImportFBAOrders"%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpSidebar" Runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpMainContent" runat="server">
<ucImportFBAOrders:ImportFBAOrders ID="importFBAOrders" runat="server" />
</asp:Content>
Upvotes: 1
Views: 111
Reputation: 4150
There should not be a period in your BestPricingEngine.Main. The Inherits
attribute is normally used in the markup to reference the code-behind of that page.
In other words, looking at this code, I would assume your Inherits
attribute should be named after that page's class, which is usually the path of the code-behind file delimited by underscores, and excluding the file extension.
Change Inherits="BestPricingEngine.Main"
to Inherits="BestPricingEngine.Pages"
Upvotes: 1