ASPX Inheritance

Discussion in 'ASP .Net Web Controls' started by Louis Somers, Jan 7, 2008.

  1. Louis Somers

    Louis Somers Guest

    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
     
    Louis Somers, Jan 7, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John M
    Replies:
    1
    Views:
    1,195
    Kumar Reddi
    May 29, 2005
  2. maxw_cc
    Replies:
    1
    Views:
    3,148
    Martijn van Steenbergen
    Dec 21, 2003
  3. cppsks
    Replies:
    0
    Views:
    827
    cppsks
    Oct 27, 2004
  4. karthikbalaguru
    Replies:
    9
    Views:
    1,041
  5. Daniel Pitts
    Replies:
    27
    Views:
    1,908
    Mike Schilling
    Feb 27, 2008
Loading...

Share This Page