KB Issue
ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl)
Issue Details
We will receive this error if the CodeFile properties do not match our main.aspx file.
Recreate Issue
In our CodeFile, we have the following at the top
Code Example
Namespace TagLib
Partial Class Default2

The Partial Class is incorrect as it does not match our @ Page in our Main.aspx file.
Resolve Issue
In our Default.aspx file, we have the following.
Code Example
@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="TagLib. Default" 


To correct this issue, we will need to make some changes to our CodeFile to make it work with our FrontEnd.
Change
Partial Class Default2
Copy
Search Site
Search Google

To
Partial Class Default
Copy
Search Site
Search Google