Designer Support when Inheriting from a Base Page Class

Discussion in 'ASP .Net' started by thechaosengine, Jul 9, 2005.

  1. Hi all,

    I wanted to put some common security functions into a class that inherits
    from the Page class and then use the new class as the basis for all my pages.

    Unfortunately, if I try and inherit from my new SecurePage class and not
    the old Page class, the designer breaks and will only allow me into html
    mode. Bugger.

    The error message given is:

    * The designer could not be shown for this file because none of the classes
    within it can be designed. The designer inspected the following classes
    in the file:
    * Login --- The base class 'ChaosTracker.UI.SecurePage' could not be loaded.

    I know its possible to carry on without designer support but I can't really
    be bothered with that carry on.

    Does anyone know if its possible to get designer support back when inheriting
    from custom base page classes

    Thanks all

    Kindest Regards

    tce
    thechaosengine, Jul 9, 2005
    #1
    1. Advertising

  2. thechaosengine

    jasonkester Guest

    Strange. All my pages derive from custom page classes, and I have no
    problem bringing them up in the Designer. (now, getting them back
    intact from the "Smart" auto-mangle is another matter!)

    So yeah, it should be possible. Stupid question, but have you compiled
    this new class yet? Referenced the project from which it comes?
    Re-installed your OS from scratch, Re-installed VS.NET, and Re-built
    the project from the ground up? Sometimes, that's the only way to get
    things to work!

    Jason Kester
    Expat Software Consulting Services
    http://www.expatsoftware.com/
    jasonkester, Jul 10, 2005
    #2
    1. Advertising

  3. thechaosengine

    Scott Allen Guest

    Any chance your base class is marked as abstract (aka MustInherit)?

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    On Sat, 09 Jul 2005 10:06:46 -0700, thechaosengine <na> wrote:

    >Hi all,
    >
    >I wanted to put some common security functions into a class that inherits
    >from the Page class and then use the new class as the basis for all my pages.
    >
    >Unfortunately, if I try and inherit from my new SecurePage class and not
    >the old Page class, the designer breaks and will only allow me into html
    >mode. Bugger.
    >
    >The error message given is:
    >
    >* The designer could not be shown for this file because none of the classes
    >within it can be designed. The designer inspected the following classes
    >in the file:
    >* Login --- The base class 'ChaosTracker.UI.SecurePage' could not be loaded.
    >
    >I know its possible to carry on without designer support but I can't really
    >be bothered with that carry on.
    >
    >Does anyone know if its possible to get designer support back when inheriting
    >from custom base page classes
    >
    >Thanks all
    >
    >Kindest Regards
    >
    >tce
    Scott Allen, Jul 10, 2005
    #3
  4. --
    John@Work


    "Scott Allen" wrote:

    > Any chance your base class is marked as abstract (aka MustInherit)?
    >
    > --
    > Scott
    > http://www.OdeToCode.com/blogs/scott/
    >
    > On Sat, 09 Jul 2005 10:06:46 -0700, thechaosengine <na> wrote:
    >
    > >Hi all,
    > >
    > >I wanted to put some common security functions into a class that inherits
    > >from the Page class and then use the new class as the basis for all my pages.
    > >
    > >Unfortunately, if I try and inherit from my new SecurePage class and not
    > >the old Page class, the designer breaks and will only allow me into html
    > >mode. Bugger.
    > >
    > >The error message given is:
    > >
    > >* The designer could not be shown for this file because none of the classes
    > >within it can be designed. The designer inspected the following classes
    > >in the file:
    > >* Login --- The base class 'ChaosTracker.UI.SecurePage' could not be loaded.
    > >
    > >I know its possible to carry on without designer support but I can't really
    > >be bothered with that carry on.
    > >
    > >Does anyone know if its possible to get designer support back when inheriting
    > >from custom base page classes
    > >
    > >Thanks all
    > >
    > >Kindest Regards
    > >
    > >tce

    >
    > I am having the same problem. I am working on a dotNetNuke project. If I inherit from a class that I create, everything compiles and runs fine, but I cannot open the user control in web forms designer anymore.


    Here is the user control (child) class statement:

    Public MustInherit Class EventManagementListingEdit
    Inherits eventManagementListingBase

    Here is the base class (parent) class statement:

    Public Class eventManagementListingBase
    Inherits Entities.Modules.PortalModuleBase
    =?Utf-8?B?Sm9obkF0V29yaw==?=, Aug 24, 2005
    #4
    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. Alf P. Steinbach
    Replies:
    6
    Views:
    533
    John Carson
    Sep 3, 2005
  2. Replies:
    4
    Views:
    385
  3. Hicham Mouline
    Replies:
    1
    Views:
    583
    Victor Bazarov
    Apr 20, 2009
  4. ET
    Replies:
    0
    Views:
    94
  5. Karan Rajput
    Replies:
    2
    Views:
    130
    Abinoam Jr.
    Dec 22, 2010
Loading...

Share This Page