CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • 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)

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    6261
  • Date Created
    Wednesday, January 11, 2023
  • Last Updated
    Wednesday, January 11, 2023
  • This Article Has been Viewed
    347 times
  • Short Desc
    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)
  • 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

    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 this error, we have the following atop our CodeFile

    Namespace TagLib
    Partial Class Default2

    In our Default.aspx file, we have the following.
    <%
    @ 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
    To
    Partial Class _Default


    --------
    Related Articles

    BC30456: 'INITIALIZECULTURE' IS NOT A MEMBER OF 'ASP.DEFAULT2_ASPX'.«