ASPX Inheritance

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
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top