473,386 Members | 1,693 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.

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 1328
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*********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.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.page class defined a <DesignerCategory and other
properties can be seen in reflector.
which of those should my base class define and which value?

the data from reflector is:

<DesignerCategory("ASPXCodeBehind"),
Designer("Microsoft.VSDesigner.WebForms.WebFormDes igner,
Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a", GetType(IRootDesigner)),
DefaultEvent("Load"),
RootDesignerSerializer("Microsoft.VSDesigner.WebFo rms.RootCodeDomSerializer,
Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a",
"System.ComponentModel.Design.Serialization.CodeDo mSerializer,
System.Design, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a", True), ToolboxItem(False),
PermissionSet(SecurityAction.InheritanceDemand, XML:="<PermissionSet
class=""System.Security.PermissionSet""" & ChrW(13) & ChrW(10) & "
version=""1"">" & ChrW(13) & ChrW(10) & " <IPermission
class=""System.Web.AspNetHostingPermission, System, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089""" & ChrW(13) & ChrW(10) &
" version=""1""" & ChrW(13) & ChrW(10) & "
Level=""Minimal""/>" & ChrW(13) & ChrW(10) & "</PermissionSet>" & ChrW(13) &
ChrW(10)), PermissionSet(SecurityAction.LinkDemand, XML:="<PermissionSet
class=""System.Security.PermissionSet""" & ChrW(13) & ChrW(10) & "
version=""1"">" & ChrW(13) & ChrW(10) & " <IPermission
class=""System.Web.AspNetHostingPermission, System, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089""" & 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******@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP14.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*********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.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.googlegr oups.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
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...
0
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...
4
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...
4
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...
6
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...
5
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...
8
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...
2
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...
4
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...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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,...
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...

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.