What's up with inheritance in code behind? Is it reliable, or should I skip
it and forget about using inheritance in web forms until they get it right?
I'm using VB.NET 2005
I have a web form named wfBase.aspx.
In the code behind I have
Partial Public Class wfBase
Inherits System.Web.UI.Page
and I have some public methods and variables.
I have another form named wfForm.aspx. In this code behind I have
Imports wfBase 'is this necessary?
Partial Class wfForm
Inherits wfBase
Everything works great.
Suddenly it stops working, and there are errors that wfBase contains no
public members.
I have to close Visual Studio and open it again, and then it works fine for
awhile, and then it happens again. Sometimes I only have to close the
solution and open it again. This is very aggravating.
Is there something I could be doing wrong?
Thanks
Bill 1 1264
Don't inherit the other part of your partial classes. Partial classes are
classes which are defined in multiple source code documents, which are
merged at compile-time. In essence, you're defining your class as inheriting
itself, which is what is causing the problem.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
"bill" <be****@datamti.com> wrote in message
news:er**************@TK2MSFTNGP09.phx.gbl... What's up with inheritance in code behind? Is it reliable, or should I skip it and forget about using inheritance in web forms until they get it right?
I'm using VB.NET 2005
I have a web form named wfBase.aspx.
In the code behind I have
Partial Public Class wfBase Inherits System.Web.UI.Page
and I have some public methods and variables.
I have another form named wfForm.aspx. In this code behind I have
Imports wfBase 'is this necessary? Partial Class wfForm Inherits wfBase
Everything works great. Suddenly it stops working, and there are errors that wfBase contains no public members. I have to close Visual Studio and open it again, and then it works fine for awhile, and then it happens again. Sometimes I only have to close the solution and open it again. This is very aggravating.
Is there something I could be doing wrong?
Thanks Bill
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ricky Romaya |
last post by:
Hi,
Are there any ways to get multiple inheritace in PHP4? For example, I have
3 parent class, class A, B, and C. I want class X to inherit all those 3
classes. Consider merging those 3 classes...
|
by: jinal jhaveri |
last post by:
Hi All,
I have one question regarding circular inheritance
I have 3 files
1) A.py , having module A and some other modules
2) B.py having module B and some other modules
3) C.py having...
|
by: Hung Jung Lu |
last post by:
Hi,
I think Microsoft did look into Python when they designed C#. (E.g.
they got rid of checked exceptions of Java.) However, they followed
Java in avoiding multiple inheritance (MI), which is a...
|
by: Mike Meng |
last post by:
hi all,
I'm a newbie Python programmer with a C++ brain inside. I have a
lightweight framework in which I design a base class and expect user to
extend. In other part of the framework, I heavily...
|
by: Steve Jorgensen |
last post by:
Recently, I tried and did a poor job explaining an idea I've had for handling
a particular case of implementation inheritance that would be easy and obvious
in a fully OOP language, but is not at...
|
by: Matthew Louden |
last post by:
I want to know why C# doesnt support multiple inheritance? But why we can
inherit multiple interfaces instead? I know this is the rule, but I dont
understand why. Can anyone give me some concrete...
|
by: Sinex |
last post by:
Hi,
Why does C# disallow multiple inheritance? Whats the reason behind this?
Is there any advantage or is it just a method to avoid some problems (if so,
what problems?) that come with multiple...
|
by: VR |
last post by:
Hi, I read about Master Pages in ASP.Net 2.0 and after implementing some
WinForms Visual Inheritance I tryed it with WebForms (let's say .aspx pages,
my MasterPage does not have a form tag itself...
|
by: Pascal Polleunus |
last post by:
Hi,
I'm wondering if there could be problems related to inheritance in the
following scenario (with PostgreSQL 7.4.1)...
1 A-table, abstract.
Max 10 B-tables that inherit from A, with...
|
by: Shawnk |
last post by:
Some Sr. colleges and I have had an on going discussion relative to when and
if
C# will ever support 'true' multiple inheritance.
Relevant to this, I wanted to query the C# community (the...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |