ASPX.VB inheriting

R

Ryan Ternier

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.
 
J

Jeffrey Palermo [MCP]

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
 
R

Ryan Ternier

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
 
G

Guest

If i were u since you would be using it ..
To save ur time just re organize it..
GDLUCK
 
K

Kevin Spencer

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 said:
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:[email protected]...
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

of
like way
of
 
R

Ryan Ternier

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 said:
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 said:
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:[email protected]...
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

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.
 
K

Kevin Spencer

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 said:
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 said:
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 said:
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 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

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.
 
R

Ryan Ternier

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 said:
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 said:
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
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.

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 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

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
 
R

Ryan Ternier

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 :(
 
K

Kevin Spencer

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 said:
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 said:
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 said:
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




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.

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 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

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top