Problems extending page class

H

Headdeball

Why is that if I derive of a class of Page called MyCustomPage, for example,
why is it that if I base my web forms upon the MyCustomPage class I can't
use the design view. Am I missing some sort of event wiring such as in
InitializeComponent or something?

Any help appreciated.
 
J

Jose Marcenaro

No event wiring is necessary, all it takes is deriving the class from the
base one.

If you are not able to open the derived page in design mode, make sure the
assembly containing the base class is compiled and available.
Sometimes a "broken" version is kept in VS cache preventing this operation;
in this case you may try exiting VS.NET IDE, then emptying the VSWebCache
folder for the user / server / application and then rebuilding the assembly
for the base page

The VSWebCache folder is located in Documents And
Settings/(username)/VSWebCache

Regards
Jose.
 
C

Craig Deelsnyder

Did you declare your base class as abstract? I can't remember, but for
either Windows or Web forms, maybe both, if a page/form's superclass is
abstract, VS.NET can't handle it.

This is only an IDE issue, note the code would run fine with it declared
as abstract. So you may want to add it back in when done editing pages.
 
H

Headdeball

Hi,
Indeed I had declared the base class as abstract. I have changed that and
now the IDE works fine. Thanks to everyone for your help. It is much
appreciated. Now that I have my IDE back it's time to do something with it
:)

Regards,
hdb
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top