By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,369 Members | 1,138 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,369 IT Pros & Developers. It's quick & easy.

ASPX.VB inheriting

P: n/a
I just got moved to a project that has an inheritance structure sort of like
this:

MyWebPage.aspx
inherits ---> MyWebPage.ASPX.VB
inherits ----> Utility.VB
inherits -----> DHTMLMenu.vb
inherits ----> System.WEb.UI.Page

Whenever I load up my aspx page, i get an error because it can't find the
System.Web.UI.Page being inherited from the code behind. Is there a way of
solving this without re-organizing the page structure? I know it's sloppy,
but I can't change it.
Nov 18 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Ryan,
I have applications with several layers of inheritance, and it works
well. From what you have stated, there is no reason why is should not work.
Try to create a test project to isolate the offending code and debug.

Best regards,
Jeffrey Palermo

"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:O9**************@TK2MSFTNGP10.phx.gbl...
I just got moved to a project that has an inheritance structure sort of like this:

MyWebPage.aspx
inherits ---> MyWebPage.ASPX.VB
inherits ----> Utility.VB
inherits -----> DHTMLMenu.vb
inherits ----> System.WEb.UI.Page

Whenever I load up my aspx page, i get an error because it can't find the
System.Web.UI.Page being inherited from the code behind. Is there a way of solving this without re-organizing the page structure? I know it's sloppy, but I can't change it.

Nov 18 '05 #2

P: n/a
Jeff,

Thank you for the reply.

Sorry if I wasn't clearer. The code works, compiles, runes etc. What my
issue is whenever I load jthe ASPX file, it tells me it can't find the page
behind. As well, any coding done on the ASPX side, does not give me any
inteli sense for anything i do.

The only way I can fix this, it is very dirty, is to cut out the Page
declarative line at the top, save the ASPX page, then open it again. Then
paste the top line back in.

/RT
"Jeffrey Palermo [MCP]" <http://dotnetjunkies.com/weblog/jpalermo> wrote in
message news:O4**************@TK2MSFTNGP12.phx.gbl...
Ryan,
I have applications with several layers of inheritance, and it works
well. From what you have stated, there is no reason why is should not work. Try to create a test project to isolate the offending code and debug.

Best regards,
Jeffrey Palermo

"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:O9**************@TK2MSFTNGP10.phx.gbl...
I just got moved to a project that has an inheritance structure sort of

like
this:

MyWebPage.aspx
inherits ---> MyWebPage.ASPX.VB
inherits ----> Utility.VB
inherits -----> DHTMLMenu.vb
inherits ----> System.WEb.UI.Page

Whenever I load up my aspx page, i get an error because it can't find the System.Web.UI.Page being inherited from the code behind. Is there a way

of
solving this without re-organizing the page structure? I know it's

sloppy,
but I can't change it.


Nov 18 '05 #3

P: n/a
If i were u since you would be using it ..
To save ur time just re organize it..
GDLUCK

"Ryan Ternier" wrote:
I just got moved to a project that has an inheritance structure sort of like
this:

MyWebPage.aspx
inherits ---> MyWebPage.ASPX.VB
inherits ----> Utility.VB
inherits -----> DHTMLMenu.vb
inherits ----> System.WEb.UI.Page

Whenever I load up my aspx page, i get an error because it can't find the
System.Web.UI.Page being inherited from the code behind. Is there a way of
solving this without re-organizing the page structure? I know it's sloppy,
but I can't change it.

Nov 18 '05 #4

P: n/a
Hi Ryan,

Perhaps you could post the "@Page" declaration at the top of your ASPX page.
It should contain a "CodeBehind" attribute that Visual Studio.Net uses to
identify the CodeBehind file at design-time. The "CodeBehind" attribute is
not necessary to the running of the Page at run-time.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:eR**************@TK2MSFTNGP10.phx.gbl...
Jeff,

Thank you for the reply.

Sorry if I wasn't clearer. The code works, compiles, runes etc. What my
issue is whenever I load jthe ASPX file, it tells me it can't find the page behind. As well, any coding done on the ASPX side, does not give me any
inteli sense for anything i do.

The only way I can fix this, it is very dirty, is to cut out the Page
declarative line at the top, save the ASPX page, then open it again. Then
paste the top line back in.

/RT
"Jeffrey Palermo [MCP]" <http://dotnetjunkies.com/weblog/jpalermo> wrote in message news:O4**************@TK2MSFTNGP12.phx.gbl...
Ryan,
I have applications with several layers of inheritance, and it works
well. From what you have stated, there is no reason why is should not

work.
Try to create a test project to isolate the offending code and debug.

Best regards,
Jeffrey Palermo

"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:O9**************@TK2MSFTNGP10.phx.gbl...
I just got moved to a project that has an inheritance structure sort
of
like
this:

MyWebPage.aspx
inherits ---> MyWebPage.ASPX.VB
inherits ----> Utility.VB
inherits -----> DHTMLMenu.vb
inherits ----> System.WEb.UI.Page

Whenever I load up my aspx page, i get an error because it can't find the System.Web.UI.Page being inherited from the code behind. Is there a

way of
solving this without re-organizing the page structure? I know it's

sloppy,
but I can't change it.



Nov 18 '05 #5

P: n/a
Sure,

Here's one:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Search.aspx.vb"
Inherits="ActionItems2.Search" %>
---
Inside Search.aspx.vb:

Public Class Search
Inherits Utility

Inside Utility:

Public Class Utility
Inherits DHTMLMenu

Inside DHTMLMenu:

Public Class DHTMLMenu
Inherits System.Web.UI.Page


"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eq**************@TK2MSFTNGP14.phx.gbl...
Hi Ryan,

Perhaps you could post the "@Page" declaration at the top of your ASPX page. It should contain a "CodeBehind" attribute that Visual Studio.Net uses to
identify the CodeBehind file at design-time. The "CodeBehind" attribute is
not necessary to the running of the Page at run-time.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:eR**************@TK2MSFTNGP10.phx.gbl...
Jeff,

Thank you for the reply.

Sorry if I wasn't clearer. The code works, compiles, runes etc. What my
issue is whenever I load jthe ASPX file, it tells me it can't find the

page
behind. As well, any coding done on the ASPX side, does not give me any
inteli sense for anything i do.

The only way I can fix this, it is very dirty, is to cut out the Page
declarative line at the top, save the ASPX page, then open it again. Then
paste the top line back in.

/RT
"Jeffrey Palermo [MCP]" <http://dotnetjunkies.com/weblog/jpalermo> wrote

in
message news:O4**************@TK2MSFTNGP12.phx.gbl...
Ryan,
I have applications with several layers of inheritance, and it works well. From what you have stated, there is no reason why is should not

work.
Try to create a test project to isolate the offending code and debug.

Best regards,
Jeffrey Palermo

"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:O9**************@TK2MSFTNGP10.phx.gbl...
> I just got moved to a project that has an inheritance structure sort of like
> this:
>
> MyWebPage.aspx
> inherits ---> MyWebPage.ASPX.VB
> inherits ----> Utility.VB
> inherits -----> DHTMLMenu.vb
> inherits ----> System.WEb.UI.Page
>
> Whenever I load up my aspx page, i get an error because it can't
find the
> System.Web.UI.Page being inherited from the code behind. Is there a

way of
> solving this without re-organizing the page structure? I know it's
sloppy,
> but I can't change it.
>
>



Nov 18 '05 #6

P: n/a
Okay, according to your @Page directive, the CodeBehind file is in the same
folder as the .aspx file, correct?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl...
Sure,

Here's one:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Search.aspx.vb"
Inherits="ActionItems2.Search" %>
---
Inside Search.aspx.vb:

Public Class Search
Inherits Utility

Inside Utility:

Public Class Utility
Inherits DHTMLMenu

Inside DHTMLMenu:

Public Class DHTMLMenu
Inherits System.Web.UI.Page


"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eq**************@TK2MSFTNGP14.phx.gbl...
Hi Ryan,

Perhaps you could post the "@Page" declaration at the top of your ASPX

page.
It should contain a "CodeBehind" attribute that Visual Studio.Net uses to
identify the CodeBehind file at design-time. The "CodeBehind" attribute is not necessary to the running of the Page at run-time.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:eR**************@TK2MSFTNGP10.phx.gbl...
Jeff,

Thank you for the reply.

Sorry if I wasn't clearer. The code works, compiles, runes etc. What my issue is whenever I load jthe ASPX file, it tells me it can't find the

page
behind. As well, any coding done on the ASPX side, does not give me any inteli sense for anything i do.

The only way I can fix this, it is very dirty, is to cut out the Page
declarative line at the top, save the ASPX page, then open it again. Then paste the top line back in.

/RT
"Jeffrey Palermo [MCP]" <http://dotnetjunkies.com/weblog/jpalermo> wrote in
message news:O4**************@TK2MSFTNGP12.phx.gbl...
> Ryan,
> I have applications with several layers of inheritance, and it works > well. From what you have stated, there is no reason why is should
not work.
> Try to create a test project to isolate the offending code and debug. >
> Best regards,
> Jeffrey Palermo
>
> "Ryan Ternier" <rt******@icompasstech.com> wrote in message
> news:O9**************@TK2MSFTNGP10.phx.gbl...
> > I just got moved to a project that has an inheritance structure sort
of
> like
> > this:
> >
> > MyWebPage.aspx
> > inherits ---> MyWebPage.ASPX.VB
> > inherits ----> Utility.VB
> > inherits -----> DHTMLMenu.vb
> > inherits ----> System.WEb.UI.Page
> >
> > Whenever I load up my aspx page, i get an error because it can't find the
> > System.Web.UI.Page being inherited from the code behind. Is there

a way
> of
> > solving this without re-organizing the page structure? I know

it's > sloppy,
> > but I can't change it.
> >
> >
>
>



Nov 18 '05 #7

P: n/a
Yes.
The code behind is in the same directory as the ASPX page.

The Utility, and DHTMLMenu files are in a seperate directory.

/RT
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Okay, according to your @Page directive, the CodeBehind file is in the same folder as the .aspx file, correct?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl...
Sure,

Here's one:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Search.aspx.vb"
Inherits="ActionItems2.Search" %>
---
Inside Search.aspx.vb:

Public Class Search
Inherits Utility

Inside Utility:

Public Class Utility
Inherits DHTMLMenu

Inside DHTMLMenu:

Public Class DHTMLMenu
Inherits System.Web.UI.Page


"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eq**************@TK2MSFTNGP14.phx.gbl...
Hi Ryan,

Perhaps you could post the "@Page" declaration at the top of your ASPX page.
It should contain a "CodeBehind" attribute that Visual Studio.Net uses

to identify the CodeBehind file at design-time. The "CodeBehind" attribute is
not necessary to the running of the Page at run-time.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:eR**************@TK2MSFTNGP10.phx.gbl...
> Jeff,
>
> Thank you for the reply.
>
> Sorry if I wasn't clearer. The code works, compiles, runes etc. What my > issue is whenever I load jthe ASPX file, it tells me it can't find
the page
> behind. As well, any coding done on the ASPX side, does not give me
any > inteli sense for anything i do.
>
> The only way I can fix this, it is very dirty, is to cut out the Page > declarative line at the top, save the ASPX page, then open it again.

Then
> paste the top line back in.
>
> /RT
> "Jeffrey Palermo [MCP]" <http://dotnetjunkies.com/weblog/jpalermo> wrote in
> message news:O4**************@TK2MSFTNGP12.phx.gbl...
> > Ryan,
> > I have applications with several layers of inheritance, and it

works
> > well. From what you have stated, there is no reason why is should not > work.
> > Try to create a test project to isolate the offending code and debug. > >
> > Best regards,
> > Jeffrey Palermo
> >
> > "Ryan Ternier" <rt******@icompasstech.com> wrote in message
> > news:O9**************@TK2MSFTNGP10.phx.gbl...
> > > I just got moved to a project that has an inheritance structure sort of
> > like
> > > this:
> > >
> > > MyWebPage.aspx
> > > inherits ---> MyWebPage.ASPX.VB
> > > inherits ----> Utility.VB
> > > inherits -----> DHTMLMenu.vb
> > > inherits ----> System.WEb.UI.Page
> > >
> > > Whenever I load up my aspx page, i get an error because it can't

find
> the
> > > System.Web.UI.Page being inherited from the code behind. Is
there a way
> > of
> > > solving this without re-organizing the page structure? I know it's > > sloppy,
> > > but I can't change it.
> > >
> > >
> >
> >
>
>



Nov 18 '05 #8

P: n/a
Yes, I have thought about this.

This is a System with over 100 dynamic aspx pages, not to mention all
objects, and classes we have. Time does not permit me to reorganize it until
it's been fully released.

This is an issue I've had with .NET for awhile, and don't know how to fix
it. Even on my home systems I get this error :(
"Patrick.O.Ige" <Pa*********@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
If i were u since you would be using it ..
To save ur time just re organize it..
GDLUCK

"Ryan Ternier" wrote:
I just got moved to a project that has an inheritance structure sort of like this:

MyWebPage.aspx
inherits ---> MyWebPage.ASPX.VB
inherits ----> Utility.VB
inherits -----> DHTMLMenu.vb
inherits ----> System.WEb.UI.Page

Whenever I load up my aspx page, i get an error because it can't find the System.Web.UI.Page being inherited from the code behind. Is there a way of solving this without re-organizing the page structure? I know it's sloppy, but I can't change it.

Nov 18 '05 #9

P: n/a
Well, Ryan, I'm currently out of ideas. I have built one ASP.Net app which
uses an inherited Page class, but only one layer of inheritance, and didn't
have the problem you mentioned. So, you have my sympathies. :-(

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:#w**************@TK2MSFTNGP09.phx.gbl...
Yes.
The code behind is in the same directory as the ASPX page.

The Utility, and DHTMLMenu files are in a seperate directory.

/RT
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Okay, according to your @Page directive, the CodeBehind file is in the

same
folder as the .aspx file, correct?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl...
Sure,

Here's one:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Search.aspx.vb" Inherits="ActionItems2.Search" %>
---
Inside Search.aspx.vb:

Public Class Search
Inherits Utility

Inside Utility:

Public Class Utility
Inherits DHTMLMenu

Inside DHTMLMenu:

Public Class DHTMLMenu
Inherits System.Web.UI.Page


"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eq**************@TK2MSFTNGP14.phx.gbl...
> Hi Ryan,
>
> Perhaps you could post the "@Page" declaration at the top of your ASPX page.
> It should contain a "CodeBehind" attribute that Visual Studio.Net uses
to
> identify the CodeBehind file at design-time. The "CodeBehind" attribute
is
> not necessary to the running of the Page at run-time.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Neither a follower
> nor a lender be.
>
> "Ryan Ternier" <rt******@icompasstech.com> wrote in message
> news:eR**************@TK2MSFTNGP10.phx.gbl...
> > Jeff,
> >
> > Thank you for the reply.
> >
> > Sorry if I wasn't clearer. The code works, compiles, runes etc.
What my
> > issue is whenever I load jthe ASPX file, it tells me it can't find the > page
> > behind. As well, any coding done on the ASPX side, does not give
me any
> > inteli sense for anything i do.
> >
> > The only way I can fix this, it is very dirty, is to cut out the Page > > declarative line at the top, save the ASPX page, then open it

again. Then
> > paste the top line back in.
> >
> > /RT
> > "Jeffrey Palermo [MCP]" <http://dotnetjunkies.com/weblog/jpalermo>

wrote
> in
> > message news:O4**************@TK2MSFTNGP12.phx.gbl...
> > > Ryan,
> > > I have applications with several layers of inheritance, and it works
> > > well. From what you have stated, there is no reason why is should not
> > work.
> > > Try to create a test project to isolate the offending code and

debug.
> > >
> > > Best regards,
> > > Jeffrey Palermo
> > >
> > > "Ryan Ternier" <rt******@icompasstech.com> wrote in message
> > > news:O9**************@TK2MSFTNGP10.phx.gbl...
> > > > I just got moved to a project that has an inheritance
structure sort
> of
> > > like
> > > > this:
> > > >
> > > > MyWebPage.aspx
> > > > inherits ---> MyWebPage.ASPX.VB
> > > > inherits ----> Utility.VB
> > > > inherits -----> DHTMLMenu.vb
> > > > inherits ----> System.WEb.UI.Page
> > > >
> > > > Whenever I load up my aspx page, i get an error because it

can't find
> > the
> > > > System.Web.UI.Page being inherited from the code behind. Is

there
a
> way
> > > of
> > > > solving this without re-organizing the page structure? I know

it's
> > > sloppy,
> > > > but I can't change it.
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 18 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.