L
Louis Somers
Hi,
I tried to inherit from my usercontrols and got the NullReference errors everyone else seems to be
getting who tried the same. After reading some of the articles and newsgroups I'm a bit confused.
Apparently, the ASPX part inherits from the code behind part instead of being the other half of the
partial class.
I somewhat accidentally found the other half of the code-behind class in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\...\App_Web_XXX.vb. (I added
an abstract (MustOverride) method to the class which caused a "not declared MustInherit" compiler
error, double click it and the generated code appears).
After googling around I could not find a definite answer how to go about this: What is the best
technical way to utilize inheritance in web application architecture?
- Should we copy everything in the ASPX part to the ASPX part of the descendant controls (yuk)?
- Is it possible to inherit directly from the ASPX part instead of the code-behind part?
- Are web developers supposed to generate procedural spaghetti and forget about OOP?
Cheers,
Louis
I tried to inherit from my usercontrols and got the NullReference errors everyone else seems to be
getting who tried the same. After reading some of the articles and newsgroups I'm a bit confused.
Apparently, the ASPX part inherits from the code behind part instead of being the other half of the
partial class.
I somewhat accidentally found the other half of the code-behind class in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\...\App_Web_XXX.vb. (I added
an abstract (MustOverride) method to the class which caused a "not declared MustInherit" compiler
error, double click it and the generated code appears).
After googling around I could not find a definite answer how to go about this: What is the best
technical way to utilize inheritance in web application architecture?
- Should we copy everything in the ASPX part to the ASPX part of the descendant controls (yuk)?
- Is it possible to inherit directly from the ASPX part instead of the code-behind part?
- Are web developers supposed to generate procedural spaghetti and forget about OOP?
Cheers,
Louis