Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4571134
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:27:39+00:00 2026-05-21T19:27:39+00:00

I have been trying to figure this out for a while now and even

  • 0

I have been trying to figure this out for a while now and even though there are plenty of Google results for the error message I receive the solution eludes me. I think that I am doing what I am supposed to be doing.

VS2010, I created a common.cs in App_Data. The content of common.cs are functions which will be used by all pages. As far as I can tell this is the proper way to share code-behind code among multiple pages.

App_Data\common.cs

namespace nprah
{
    public class BasePage : System.Web.UI.Page
    {
    }
{

fish-creek.aspx.cs

namespace nprah
{
    public partial class Fishck : BasePage
    {
    }
}

fish-creek.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="fish-creek.aspx.cs" Inherits="nprah.BasePage" %>  

If I understand the Inherits attribute correctly then it does need to contain the NameSpace.ClassName, which mine does. See: http://support.microsoft.com/kb/312311

When I run this code it results in the following output:

Compiler Error Message: 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).

Source Error:

Line 11: {
Line 12:
Line 13: public partial class Fishck : BasePage
Line 14: {
Line 15:

Visual Studio is not showing any errors during the design. Any guidance you may be able to provide will be much appreciated. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:27:40+00:00Added an answer on May 21, 2026 at 7:27 pm

    In your ASPX it should be

    Inherits="nprah.Fishck"
    

    Inherits in your .aspx should be mapping to your code file(.cs)… and from there your codefile will inherit your basepage like you already did.

    And also try to validate that : CodeFile=”fish-creek.aspx.cs”.
    Because with the name of the file you supplied it should be : Codefile=”fishck.aspx.cs”.
    Maybe just a typo.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay I've been trying to figure this out for a while now. I have
I have been trying to figure out how all this validation works, but I
I have been working on JUNG2 for a while now, trying to visualize a
I'm fairly new to GWT and have been trying to piece together things to
I've been trying to wrap my head around this issue for the last hours
I have implemented a version of Rush Hour (the puzzle board game) in Python
I'm building an application using WPF and MVVM. I've come across a situation where
I converted a Subversion repository to Mercurial a few months back and I wound
I'm a JavaScript newbie working on a website and I've run into an issue

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.