473,386 Members | 1,733 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,386 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 1447
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.