ASPX.VB inheriting

  • Thread starter Thread starter Ryan Ternier
  • Start date Start date
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.
 
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
 
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
 
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
 
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.
 
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.
 
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
 
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 :(
 
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.
 
Back
Top