473,511 Members | 14,951 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inherits multiple source?

I've read quite a number of posts here and none seems to address my
situation..

Currently, I use this line to retrieve user's info, which will pretty
much be used in every single page that is password protected.
<%@Page Language="VB" Debug="true" Inherits="SessionVerify"
Src="/scriptfiles/SessionInfo.vb" %>

SessionInfo.vb contains the class SessionVerify which has the function
"Auth()" that I need to run in Page_Load of the parent page.

Now, I also plan to have another *.vb file that handles a particular
printable format rendering. How do in specify that so that I can call
both vb src pages and both Inherits ?

Seems like in order to accomplish this, I'd have to include the same
get session code info in every vb src that contain a specific set of
functionality? Is there a way to have a *.vb file reference another
*.vb file so that if I change something in the sessionverify code, I
don't have to update all other *.vb?

Apr 21 '06 #1
1 1729
There is no multiple inheritence in .NET

If you have another class that some pages need to be inheriting from, then
have your printable rendering class inherit from SessionVerify, and then
have your page inherit from this new printable reading class. Pages that
don't need it can continue to use SessionVerify.

The other option is containment. Meaning, your page creates an instance of
the printable reading class (this class would not inherit Page), and calls
methods on this instance passing the appropriate arguments so this class can
correctly manipulate the page.

<te***@yahoo.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
I've read quite a number of posts here and none seems to address my
situation..

Currently, I use this line to retrieve user's info, which will pretty
much be used in every single page that is password protected.
<%@Page Language="VB" Debug="true" Inherits="SessionVerify"
Src="/scriptfiles/SessionInfo.vb" %>

SessionInfo.vb contains the class SessionVerify which has the function
"Auth()" that I need to run in Page_Load of the parent page.

Now, I also plan to have another *.vb file that handles a particular
printable format rendering. How do in specify that so that I can call
both vb src pages and both Inherits ?

Seems like in order to accomplish this, I'd have to include the same
get session code info in every vb src that contain a specific set of
functionality? Is there a way to have a *.vb file reference another
*.vb file so that if I change something in the sessionverify code, I
don't have to update all other *.vb?

Apr 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7161
by: Ben R. | last post by:
Between ClassName and Inherits, which attribute is set to specify the class that a page uses? I would think that would be inherits. Further, the description for ClassName is: Specifies the class...
3
1231
by: Jet Leung | last post by:
Hi all, I had made a UserControl, and I want to inherits panel,label,button and linklabel from my class. But when I typed the code like ==== public class A :...
6
1458
by: Todd A | last post by:
If I use the following in my code behind page: Public Class _Default Inherits System.Web.UI.Page The page will compile with no errors from the command line compiler (vbc.exe) But, If I...
7
1689
by: tshad | last post by:
I have a control that I am using from Metabuilders that requires you to use: <%@ Page Inherits="MetaBuilders.WebControls.DialogPage" %> How do I inherit my code-behind page or another object...
5
19560
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
0
1555
by: john | last post by:
The changes to asp.net makes it very difficult for us to migrate one of our web projects to 2.0 and makes deployments more difficult for us. It seems that the new Asp.net model is only designed...
1
11149
by: christian.Blackburn | last post by:
Hi Gang, On my development system I am not getting this error, but it does happen when I upload it to my ISP. Can someone tell me why this is happening? I don't have any user-defined controls...
7
1750
by: Bart_D | last post by:
Hi, Can anybody explain me what's the difference between for example: imports system.data implements ICallbackEventHandler inherits System.Web.UI.Page Thanks Bart
4
5902
by: =?Utf-8?B?QWxleCBNdW5r?= | last post by:
My Web application is developed in C# Visual Studio 2005 Professional. After deploying the application to the production server I am getting the following error: <%@ Application...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7349
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7417
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5659
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4734
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.