Your terminology is a bit incorrect. The class that is dynamically compiled when the page is requested (<pagename>_aspx) is the end of the inheritance chain. You can modify what class those pages derive from, but you can't make them be inherited by another class. Those page classes are the classes that are being instantiated by the framework when you request a page.
You can create a class that inherits System.Web.UI.Page
Public Class MyPage : Inherits System.Web.UI.Page
...
End Class
Then your ASPX Pages can inherit your class by either direct inheritance from the page directive:
<%@ Page Inherits="MyApplication.MyPage" %>
Or by deriving the page's code-behind class from it:
<%@ Page Inherits="MyApplication.MyASPXPage" %>
Public Class MyASPXPage : Inherits MyPage
...
End Class
Once you have done this you can call methods in your MyPage class. If you are trying to build a class with helper functions then you don't necessarily need to make a class that is inherited by your pages. You can just build a class with shared/static methods that page code consumes.
Also, the term "include file" is not used in ASP.NET. Instead, the .
vb/.cs files that you put in a project are compiled into the project assembly. Then the classes in the assembly are available for use by any executing modules in the application domain where those assemblies are found.
-
Peter