473,761 Members | 9,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Designer Support when Inheriting from a Base Page Class

Hi all,

I wanted to put some common security functions into a class that inherits
from the Page class and then use the new class as the basis for all my pages.

Unfortunately, if I try and inherit from my new SecurePage class and not
the old Page class, the designer breaks and will only allow me into html
mode. Bugger.

The error message given is:

* 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:
* Login --- The base class 'ChaosTracker.U I.SecurePage' could not be loaded.

I know its possible to carry on without designer support but I can't really
be bothered with that carry on.

Does anyone know if its possible to get designer support back when inheriting
from custom base page classes

Thanks all

Kindest Regards

tce

Jul 22 '05 #1
3 2668
Strange. All my pages derive from custom page classes, and I have no
problem bringing them up in the Designer. (now, getting them back
intact from the "Smart" auto-mangle is another matter!)

So yeah, it should be possible. Stupid question, but have you compiled
this new class yet? Referenced the project from which it comes?
Re-installed your OS from scratch, Re-installed VS.NET, and Re-built
the project from the ground up? Sometimes, that's the only way to get
things to work!

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

Jul 22 '05 #2
Any chance your base class is marked as abstract (aka MustInherit)?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 09 Jul 2005 10:06:46 -0700, thechaosengine <na> wrote:
Hi all,

I wanted to put some common security functions into a class that inherits
from the Page class and then use the new class as the basis for all my pages.

Unfortunatel y, if I try and inherit from my new SecurePage class and not
the old Page class, the designer breaks and will only allow me into html
mode. Bugger.

The error message given is:

* 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:
* Login --- The base class 'ChaosTracker.U I.SecurePage' could not be loaded.

I know its possible to carry on without designer support but I can't really
be bothered with that carry on.

Does anyone know if its possible to get designer support back when inheriting
from custom base page classes

Thanks all

Kindest Regards

tce


Jul 22 '05 #3

--
John@Work
"Scott Allen" wrote:
Any chance your base class is marked as abstract (aka MustInherit)?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 09 Jul 2005 10:06:46 -0700, thechaosengine <na> wrote:
Hi all,

I wanted to put some common security functions into a class that inherits
from the Page class and then use the new class as the basis for all my pages.

Unfortunatel y, if I try and inherit from my new SecurePage class and not
the old Page class, the designer breaks and will only allow me into html
mode. Bugger.

The error message given is:

* 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:
* Login --- The base class 'ChaosTracker.U I.SecurePage' could not be loaded.

I know its possible to carry on without designer support but I can't really
be bothered with that carry on.

Does anyone know if its possible to get designer support back when inheriting
from custom base page classes

Thanks all

Kindest Regards

tce


I am having the same problem. I am working on a dotNetNuke project. If I inherit from a class that I create, everything compiles and runs fine, but I cannot open the user control in web forms designer anymore.


Here is the user control (child) class statement:

Public MustInherit Class EventManagement ListingEdit
Inherits eventManagement ListingBase

Here is the base class (parent) class statement:

Public Class eventManagement ListingBase
Inherits Entities.Module s.PortalModuleB ase

Aug 24 '05 #4

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

Similar topics

11
2168
by: Noah Coad [MVP .NET/C#] | last post by:
How do you make a member of a class mandatory to override with a _new_ definition? For example, when inheriting from System.Collections.CollectionBase, you are required to implement certain methods, such as public void Add(MyClass c). How can I enforce the same behavior (of requiring to implement a member with a new return type in an inherited class) in the master class (similar to the CollectionBase)? I have a class called...
1
3404
by: S Guiboud | last post by:
I want to subclass the System.Web.UI.UserControl to make a common control for my site. Then, when I create a new UserControl from the Visual Studio I changed the base class System.Web.UI.UserControl to my UserControl class (a.k.a MyUserControl). MyUserControl is only a .cs file with a class inheriting from System.Web.UI.UserControl. But, when I try to view the control in the Visual Studio designer it always pop me a window asking me if I...
19
2987
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and provide an open TD with a DIV in it for the content of this formlet. (The DIV is for DHTML to hide and show the content) I've created a web page showing step by step the two problems I'm encountering. This problem is much easier to see than it...
1
1203
by: Carlo Marchesoni | last post by:
Some days ago I asked this forum whether it is possible to set up the <title> from the code-behind. A couple of poeple helped me and in fact it is quite ease: a) change the HTML, e.g.: <title id="titAV0010" runat="server"></title> b) define the field as GenericControl: protected System.Web.UI.HtmlControls.HtmlGenericControl titAV0010; c) change modifying the innerText property: titAV0010.InnerText = rm.GetString("AV0010.Title"); This...
3
1378
by: thechaosengine | last post by:
Hi all, I wanted to put some common security functions into a class that inherits from the Page class and then use the new class as the basis for all my pages. Unfortunately, if I try and inherit from my new SecurePage class and not the old Page class, the designer breaks and will only allow me into html mode. Bugger. The error message given is:
4
1388
by: Slimeman | last post by:
When I create a BasePage class in either the same or separate assembly, create a Web Form that inherits from BasePage, and then attempt to view my Web Form in the visual designer, I get the following error: ---------- 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:
1
4687
by: dusanv | last post by:
Hi, I have a class (say O1) that overrides System::Windows::Forms::UserControl and then another one that overrides O1 (call it O2). O2 used to work with the Designer as it was inheriting directly from UserControl (and was created using the wizard) but since I inserted O1 into inheritance tree (without resx, straight override) I get the error pasted at the bottom when trying to open O2 in Designer. I deleted the NCB file to no avail....
4
5833
by: ThunderMusic | last post by:
Hi, I have a custom form that works fine when I debug it or run it in release mode but cannot be loaded in the designer... Actually, it can be loaded in the designer when no control is on it, but the resizing tool (in the designer) is offset both horizontally and vertically and when I put a control on it, as soon as I save, the designer throws an exception (but cannot be reproduced everytime) and the form cannot be loaded anymore unless...
9
2268
by: TS | last post by:
how do i regenerate the designer file, mine got out of sync and i deleted it - thought it would create new one. thanks
0
10136
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9988
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9923
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7358
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3911
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 we have to send another system
3
2788
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.