|
-
Sep 13th, 2002, 08:43 PM
#1
Thread Starter
Hyperactive Member
Inheriting another pages onLoad event
Hi, I have a page that does a whole lot of stuff in its onLoad event.
What I was wondering if it is possible to inherit this page (And therefore it functionality) in a new page and utilise the existing onLoad event of the inherited page by overriding the onLoad event of the new page.
Or, is it best that I just package all the existing functionality in a new class and use it that way even though webforms are actually classes....
I tried to specify two classes to inherit but I get an error message saying that I can only inherit a single class and its functionality.
Code:
' I thought that I could do this and get the code behind page to inherit both the webform that it is associated with and another webform
Public Class contact
Inherits System.Web.UI.Page
Inherits ProjectName.PageName
Ideas welcome, regards
MarkusJ
-
Sep 13th, 2002, 10:39 PM
#2
Hyperactive Member
Hi,
You can only inherit a single class but you can do multiple interface implementation with the Implements keyword BUT i doubt thats what you want as the interface doesnt contain any implementation
If you have a class that has to be inherited, separate that as a base class to be inherited by your web forms. It is more structured that way.
hth
William T
Software Architect / Chief Software Developer
Softwaremaker.Net Pte Ltd
http://www.Softwaremaker.net
*** Things are always the darkest before they go pitch black ***
-
Sep 14th, 2002, 12:06 AM
#3
Thread Starter
Hyperactive Member
Yeah, that's what I thought I might have to do, worth a try though 
Regards
MarkusJ
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|