473,769 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

designer don't work when inherits from other PageBase

z f
the HTML designer for aspx pages don't work is the page inherits from a
custom pageBase.
any solution?

TIA.
Nov 19 '05 #1
5 1351
This is a known issue with VS.NET, probably...

Make sure your base class has a public constructor with no arguments.
Also, make sure it's not an abstract class. (VS.NET can't handle that.)

Even with both of these conditions met, sometimes VS.NET will simply
refuse to load the page into the designer. When this happens, close the
page in question, close the project, then open everything up again.
Most of the time this will temporarily solve the problem.

Nov 19 '05 #2
If your PageBase is generic enough, consider compiling it as a separate .NET
assembly and including a reference to it in your ASP.NET project

-- Sean M

<th*********@gm ail.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
This is a known issue with VS.NET, probably...

Make sure your base class has a public constructor with no arguments.
Also, make sure it's not an abstract class. (VS.NET can't handle that.)

Even with both of these conditions met, sometimes VS.NET will simply
refuse to load the page into the designer. When this happens, close the
page in question, close the project, then open everything up again.
Most of the time this will temporarily solve the problem.

Nov 19 '05 #3
z f
you both wrong, but we need someone to explain the issue:

the system.ui.web.p age class defined a <DesignerCatego ry and other
properties can be seen in reflector.
which of those should my base class define and which value?

the data from reflector is:

<DesignerCatego ry("ASPXCodeBeh ind"),
Designer("Micro soft.VSDesigner .WebForms.WebFo rmDesigner,
Microsoft.VSDes igner, Version=7.0.500 0.0, Culture=neutral ,
PublicKeyToken= b03f5f7f11d50a3 a", GetType(IRootDe signer)),
DefaultEvent("L oad"),
RootDesignerSer ializer("Micros oft.VSDesigner. WebForms.RootCo deDomSerializer ,
Microsoft.VSDes igner, Version=7.0.500 0.0, Culture=neutral ,
PublicKeyToken= b03f5f7f11d50a3 a",
"System.Compone ntModel.Design. Serialization.C odeDomSerialize r,
System.Design, Version=1.0.500 0.0, Culture=neutral ,
PublicKeyToken= b03f5f7f11d50a3 a", True), ToolboxItem(Fal se),
PermissionSet(S ecurityAction.I nheritanceDeman d, XML:="<Permissi onSet
class=""System. Security.Permis sionSet""" & ChrW(13) & ChrW(10) & "
version=""1"">" & ChrW(13) & ChrW(10) & " <IPermission
class=""System. Web.AspNetHosti ngPermission, System, Version=1.0.500 0.0,
Culture=neutral , PublicKeyToken= b77a5c561934e08 9""" & ChrW(13) & ChrW(10) &
" version=""1""" & ChrW(13) & ChrW(10) & "
Level=""Minimal ""/>" & ChrW(13) & ChrW(10) & "</PermissionSet>" & ChrW(13) &
ChrW(10)), PermissionSet(S ecurityAction.L inkDemand, XML:="<Permissi onSet
class=""System. Security.Permis sionSet""" & ChrW(13) & ChrW(10) & "
version=""1"">" & ChrW(13) & ChrW(10) & " <IPermission
class=""System. Web.AspNetHosti ngPermission, System, Version=1.0.500 0.0,
Culture=neutral , PublicKeyToken= b77a5c561934e08 9""" & ChrW(13) & ChrW(10) &
" version=""1""" & ChrW(13) & ChrW(10) & "
Level=""Minimal ""/>" & ChrW(13) & ChrW(10) & "</PermissionSet>" & ChrW(13) &
ChrW(10))> _
Public Class Page


"Sean M" <ta******@hotma il.com> wrote in message
news:%2******** *******@TK2MSFT NGP14.phx.gbl.. .
If your PageBase is generic enough, consider compiling it as a separate
.NET assembly and including a reference to it in your ASP.NET project

-- Sean M

<th*********@gm ail.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
This is a known issue with VS.NET, probably...

Make sure your base class has a public constructor with no arguments.
Also, make sure it's not an abstract class. (VS.NET can't handle that.)

Even with both of these conditions met, sometimes VS.NET will simply
refuse to load the page into the designer. When this happens, close the
page in question, close the project, then open everything up again.
Most of the time this will temporarily solve the problem.


Nov 19 '05 #4
z f wrote:
you both wrong, but we need someone to explain the issue:

[snip rest]

What a lovely way of thanking people who take time to answer your
questions for free. Based on your original question, the first response
(about ensuring there is a public no args constructor and that it's not
marked MustInherit) is correct for 99.995% of the people who ask the
question.

I've never had to play around with any attributes to make it work.
Perhaps a cutdown copy of the page that your trying to inherit from to
allow us to reproduce the issue?

Damien

Nov 19 '05 #5
z f
you're right.
i think there was some kind of error with my solution.
when i open the project directly and create a new solution it's working
((for now...until next time it will stop working)
maybe there's some problem related to solutions with many (4-5) projects and
source-safe integration that causing some problems.
10x.
"Damien" <Da************ *******@hotmail .com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
z f wrote:
you both wrong, but we need someone to explain the issue:

[snip rest]

What a lovely way of thanking people who take time to answer your
questions for free. Based on your original question, the first response
(about ensuring there is a public no args constructor and that it's not
marked MustInherit) is correct for 99.995% of the people who ask the
question.

I've never had to play around with any attributes to make it work.
Perhaps a cutdown copy of the page that your trying to inherit from to
allow us to reproduce the issue?

Damien

Nov 19 '05 #6

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

Similar topics

3
2669
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:
0
1395
by: gh0st54 | last post by:
An update on my original message seens like virtual directory doesn't like page inheritance I have taken my form in my Secure folder and made a duplicate in the main site, it works fine from the main site but in the virtual directory I get that error message : 'CS0234: The type or namespace name 'PageBase' does not exist in the class or namespace '<namespace>' (are you missing an assembly reference?)'
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:
4
3159
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps further away, completely leaving the selector box area. Any ideas? VS 2003 and VB.Net This is a simple application at the moment but the form is inherited from a
6
6018
by: Nathan Sokalski | last post by:
I recently converted some ASP.NET 1.1 projects of mine, created with Visual Studio .NET 2003, to Web Application Projects in Visual Studio .NET 2005 so that I could use ASP.NET 2.0 (All my ASP.NET is done using VB.NET). After converting, everything was fine, and worked and compiled correctly, but I noticed one big difference between the VB.NET code of the converted files in the projects and the VB.NET code in new pages. The new pages use...
5
1505
by: active | last post by:
I tried to use a datasource with a combobox and it didn't work completely so I build a small test that was much more straight forward then the app. The test was to see if the combobox dropdown list displayed the correct data. However, although the designer shows the combobox the combobox does not show at runtime. If you would be so kind as to cut the code below and paste it into a form
8
2316
by: TomC | last post by:
I want to bypass the Windows Form Designer in VS, to create a form programmatically. The elements of the form are to be arranged in a table, and I want the size of the table (and therefore the number of elements) to be determined at runtime, so dragging and dropping on the Form Designer won't cut the mustard. I'm coming from a Java background, and have almost always built my GUI's programmatically, but I realize that in C# this practice...
2
5686
by: Joh Smith | last post by:
I have a form called Parent that I mark as abstract (MustInherit). Then I add another form called Child that inherits Parent and implements all Parent abstract methods. It compiles Ok, but when i try to edit Child in Form Designer I get following error: The designer must create an instance of type Parent' but it cannot because the type is declared as abstract. Funny thing is I am still able to view Parent and edit it in the designer....
4
3026
by: Phil | last post by:
VS 2008 I have a windows form that was created in the normal way using the form designer. I do not wish to use this form directly though, I want to use it as a basis for some other forms. I have added a MustOverride Sub and have added MustInherit to the class definition. I then created a second form, this time by adding a class module, and specifying that it inherits from my first form. It all works fine, but when I double-click on the...
0
9420
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10205
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
10035
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...
0
8863
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7401
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
5293
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
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3949
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
2
3556
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.