473,327 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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 1132
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...
7
by: A Traveler | last post by:
Hello all, i was just curious if anyone whos been playing with VS2005 could tell me... In javascript (and java??) you can alter the prototypes for an object in your project. I dont remember...
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.