473,473 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problems extending page class

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.
Nov 18 '05 #1
4 1453
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.

"Headdeball" <he********@hotmail.com> escribió en el mensaje
news:Og****************@TK2MSFTNGP11.phx.gbl...
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.

Nov 18 '05 #2
Thanks Jose,
I will try your suggestion.

Best regards,
hdb

"Jose Marcenaro" <jo***@nospam.da-vinci.com.ar> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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.

"Headdeball" <he********@hotmail.com> escribió en el mensaje
news:Og****************@TK2MSFTNGP11.phx.gbl...
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.


Nov 18 '05 #3
Headdeball wrote:
"Headdeball" <he********@hotmail.com> escribió en el mensaje
news:Og****************@TK2MSFTNGP11.phx.gbl.. .
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


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.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #4
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

"Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Headdeball wrote:
"Headdeball" <he********@hotmail.com> escribió en el mensaje
news:Og****************@TK2MSFTNGP11.phx.gbl.. .

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


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.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Anthony Williams | last post by:
Morning all, I'm having a wee problem with a project I'm working on at the moment. I'm leading my company into producing a website, based upon Web Standards, which will be created using XHTML...
4
by: Headdeball | last post by:
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...
8
by: Mark Olbert | last post by:
I'm writing a custom MembershipProvider which uses a custom class derived from MembershipUser (basically, the derived class adds a field to the MembershipUser base class). When I try to configure...
5
by: vbgunz | last post by:
Hello everyone. I own two books. Learning Python and Python in a nutshell. When cross referencing the two books to try and clarify the ideas behind extending methods and delegates, this is where...
10
by: Christophe Peillet | last post by:
I am trying to create a BasePage for use in a large asp.net application, that will centrally provide certain extra properties and logic to the application. (The web project makes use Master Pages...
9
by: Fat Elvis | last post by:
I'd like to extend some of my Asp.net pages by using Partial Classes. Example ASP.Net Page: public partial class Admin_Customer : System.Web.UI.Page { protected void Page_Load(object sender,...
2
by: TheHobbit | last post by:
Hi there I am a real newbie to CSS so please excuse any daft questions! I am trying to create a page with a header that contains a small square logo in top left corner with 2 longer divs to the rigt...
0
by: marcell71 | last post by:
I'm trying to get Boost.Python to working using the instructions here: http://www.boost.org/libs/python/doc/building.html. I am on step 3.1.4 and am getting a linking error that I can't figure out....
8
by: Floortje | last post by:
Hi i have been struggeling with this question for quite some time now. I have some helper classes that handle images (upload an image, create thumbnails and show a imagelist), links (add link,...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.