I have two aspx pages:
Default.aspx with its code behind page of Default.aspx.vb
Home.aspx with its code behind page of Home.aspx.vb
The Default page in effect is just a template, the Home page will be the same but with some extra functionailty. I dont want to have to copy the code from the Default.aspx.vb to the Home.aspx.vb page since I assume there is a more efficient way.
Ive tried to inherit the Default code into the Home code like so:
Default.aspx.vb
Expand|Select|Wrap|Line Numbers
- Public MustInherit Class DefaultCode
- Inherits System.Web.UI.Page
Expand|Select|Wrap|Line Numbers
- <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Home.aspx.vb" Inherits="DefaultCode" %>
Expand|Select|Wrap|Line Numbers
- Partial Class Home
- Inherits DefaultCode
If i move the Default.aspx.vb into the App_Code file (im using Visual Web Developer) Home.aspx.vb inherits DefaultPage but Home.aspx wont run, there loads of errors.
Thanks, Ash.