I'm a beginner in asp.net (c#). I'm trying to develop an inheritance process. In my web application, I created a page called BaseClass.aspx
. This is supposed to be the page from which I want to inherit all methods et properties. I create another page called DerivedClass.aspx
. So I try to derive DerivedClass.aspx.cs
from BaseClass.aspx.cs
and I get this error:
Could not load the type BaseClass.aspx.cs
In DerivedClass.aspx
:
<%@ Page Language="C#" AutoEventWireup="true" CodeFileBaseClass="BaseClass.aspx.cs" CodeFile="DerivedClass.aspx.cs" CodeBehind="DerivedClass.aspx.cs" Inherits="TestHerit.DerivedClass" %>
In BaseClass.aspx
:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BaseClass.aspx.cs" Inherits="TestHerit.BaseClass" %>
I have tried all the solutions read on the net about this without solving the problem.
May anyone help me, please?