Upgrade To 2003: Cannot Load Web Forms Designer; Using Page Descendent

L

L Scott

I've created a page ancestry (framework) for our application so that all
pages in our app would have the same look and feel. To do this, I created
several user controls (header, footer, menu, etc.) and then a C# class which
inherits from System.Web.UI.Page. In the OnInit() method of this class, I
dynamically load these user controls using the 'this.Controls.AddAt()'
method (as well as call the base.OnInit() method to load the objects from
the descendent). All my application pages inherit from the C# class
('AppBasePage') instead of the Page class. This worked well in .Net 2002.
In .Net 2003, none of the descendent pages can load the Web Forms Designer
and when the descendent page is opened, they all get the following error
message:


The file could not be loaded into the Web Forms designer. Please correct
the following error and then try loading it again:

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:

DesendentPageBeingOpened --- The base class 'AppBasePage' could not be
loaded. Ensure the assembly has been referenced or built if it is part of
the project.

Make sure all of the classes used in the page are built or referenced in
the project. Click Help for more information.
Obviously, this page and these objects are in the project and should be
being built with the project. As a work around, if the developers need to
get to the Designer, I've asked them to change the ancestry of the page back
to System.Web.UI.Page, close the page and then reopen it. This allows them
back into the Designer. Pretty messy. I'm hoping there's a better
resolution. Has anyone seen this behavior with 2003? Can anyone suggest a
(hopefully easy) fix?

Thanks.

LWS
 

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

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top