designer don't work when inherits from other PageBase

T

thinkfr33ly

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.
 
Z

z f

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

TIA.
 
S

Sean M

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
 
Z

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.WebFormDesigner,
Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a", GetType(IRootDesigner)),
DefaultEvent("Load"),
RootDesignerSerializer("Microsoft.VSDesigner.WebForms.RootCodeDomSerializer,
Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a",
"System.ComponentModel.Design.Serialization.CodeDomSerializer,
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
 
D

Damien

z said:
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
 
Z

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 said:
z said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top