inherit from class which inherits from Page class

D

djus

Hello

At the begining I'm sorry for my English :(

I want my aspx page TestPage.aspx to inherit from MyClass2.
MyClass2 inherits from MyMainClass which is subtype of Page:

public class MyMainClass : Page
public class MyClass2 : MyMainClass

Both classes are in MyNamespace namespace.
They are compiled as one dll library mylibrary.dll

In TestPage.aspx I have something like this:
<%@ Page Language="C#" Inherits="MyNamespace.MyClass2" %>

I have created new application in IIS and put mylibrary in Bin
directory, which is in the same directory as TestPage.aspx.

And when I want to open TestPage.aspx in my browser:
http://myserwer/mydirectory/TestPage.aspx

I get this error:

Parser Error Message: Could not load type 'MyNamespace.MyClass2'.

But when I inherit from MyMainClass:
<%@ Page Language="C#" Inherits="MyNamespace.MyMainClass" %>

everything is OK.

Is it possible to inherit from another page that this one which inheritr
directly from Page class?

Thanks in advance for your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top