Ask a Question related to ASP.NET General, Design and Development.
-
Francis Shanahan #1
"Cannot Be Designed" error
Folks,
I have a base page which is the grand-daddy of all my pages. It inherits
from System.UI.Web.Page
From this I inherit a layout page.
From this I inherit the individual pages themselves.
The problem: My pages can no longer be brought up in the designer. I'm using
Visual Studio 2002 and these pages are written in asp.NET with the code
behinds in vb.NET.
The ancestors are all just regular .vb classes with no visual components.
Even when I switch my pages back to inherit directly from System.UI.Web.Page
I can't bring them up in the designer. This is a real pain.
Has anyone seen this?
Will upgrading to Visual Studio 2003 fix the bug?
Cheers,
-fs
Francis Shanahan Guest
-
#37773 [Ver->Asn]: iconv_substr() gives "Unknown error" when string length = 1"
ID: 37773 Updated by: tony2001@php.net Reported By: dave at dgx dot cz -Status: Verified +Status: Assigned Bug Type: ... -
"Error Creating Control" and "Cast from String"
I'm creating a custom date control. In appearance, it's just a textbox and a button. It has three custom properties: CalDate, CalDateType and... -
Acrobat Form Submit error: changes VALUE="true" to "0"
I wrote an HTML page with a form. In the form I had many inputs as in: <INPUT TYPE="radio" NAME="Q1" VALUE="true"> and <INPUT TYPE="radio"... -
#12029 [Com]: "--with-apxs" can cause the error "MySQL: Unable to save result set in"
ID: 12029 Comment by: sietzepost at streetwisedd dot nl Reported By: root at byone dot com Status: Bogus Bug... -
"The VMs are designed for statically typed languages..."...
I am reading this article : http://www.infoworld.com/article/03/03/21/12stratdev_1.html and this messages: ... -
William F. Robertson, Jr. #2
Re: "Cannot Be Designed" error
That happens to me and my group from time to time. The only way we have
found around it, is to close all .aspx pages, then studio, and reopen it.
That usually fixes it.
Now if you have the Web Control Library in the same solution I have to
rebuild, then close (close all open pages first), then reopen, then rebuild,
then open the problem pages. That usually fixes it.
Don't know if upgrading will help you, but this usually corrects the problem
for my group.
HTH,
bill
"Francis Shanahan" <fs@NoSpamPlease.francisshanahan.com> wrote in message
news:#4wjehJRDHA.3880@tk2msftngp13.phx.gbl...inherits> Folks,
> I have a base page which is the grand-daddy of all my pages. Itusing> from System.UI.Web.Page
>
> From this I inherit a layout page.
>
> From this I inherit the individual pages themselves.
>
> The problem: My pages can no longer be brought up in the designer. I'mSystem.UI.Web.Page> Visual Studio 2002 and these pages are written in asp.NET with the code
> behinds in vb.NET.
>
> The ancestors are all just regular .vb classes with no visual components.
> Even when I switch my pages back to inherit directly from> I can't bring them up in the designer. This is a real pain.
>
> Has anyone seen this?
>
> Will upgrading to Visual Studio 2003 fix the bug?
>
> Cheers,
> -fs
>
>
>
William F. Robertson, Jr. Guest
-
Francis Shanahan #3
Re: "Cannot Be Designed" error
Thanks for the response.
In the Basepage, I apply security (enable/disable controls) to the controls
array.
In the Layout page, I remove all controls and add them back to the page
along with the form tag. Fairly standard inheritance scheme.
I've tried the suggestions, nothing seems to fix it.
-fs
"Natty Gur" <natty@dao2com.com> wrote in message
news:OvcpXCKRDHA.3144@tk2msftngp13.phx.gbl...> Hi,
>
> There isn't any problem with designer and creating your own base page
> class. Your problem might be result from your code. Can you describe
> what are you doing in your base page? Are you rendering anything?
>
> Natty Gur, CTO
> Dao2Com Ltd.
> 28th Baruch Hirsch st. Bnei-Brak
> Israel , 51114
>
> Phone Numbers:
> Office: +972-(0)3-5786668
> Fax: +972-(0)3-5703475
> Mobile: +972-(0)58-888377
>
> Know the overall picture
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Francis Shanahan Guest
-
Francis Shanahan #4
Re: "Cannot Be Designed" error
I'm just enabling/disabling based on a cookie value in the basepage. I'm not
attaching to a thread or any of that.
Here's the thing that makes me think it's studio related: When I modify the
page to inherit from System.UI.Web.Page, I get the error "The base class
"System.UI.Web.Page" cannot be designed. "
Weird right?
"William F. Robertson, Jr." <wfrobertson@kpmg.com> wrote in message
news:OaaXPHLRDHA.2224@TK2MSFTNGP12.phx.gbl...stuff.> VS 2002
>
> I see on your other post you are talking about applying security andpages.> How are you doing it? In what method/event are you doing it on. It might
> be trying to process the security code in the designer, and thus...wigging
> out.
>
> bill
>
>
> "Francis Shanahan" <fs@NoSpamPlease.francisshanahan.com> wrote in message
> news:OrKKToKRDHA.1560@TK2MSFTNGP12.phx.gbl...> > Thanks for the response William. Unfortunately your suggestions haven't
> > resolved my problem.
> > Can you tell me which version of studio you're on?
> > In my case, the layout class is in the same project as the regularseperate> > The layout class itself inherits from the base page which is in aclear> > assembly, in a seperate solution entirely so the reference is just a DLL
> > reference, not a project reference.
> >
> > any ideas you can throw out there are MUCH appreciated. I'd love tohave> > this up.
> > -fs
> >
> >
> > "William F. Robertson, Jr." <wfrobertson@kpmg.com> wrote in message
> > news:%23k$HEGKRDHA.1988@TK2MSFTNGP12.phx.gbl...> > > That happens to me and my group from time to time. The only way weI'm> it.> > > found around it, is to close all .aspx pages, then studio, and reopen> message> > rebuild,> > > That usually fixes it.
> > >
> > > Now if you have the Web Control Library in the same solution I have to
> > > rebuild, then close (close all open pages first), then reopen, then> > problem> > > then open the problem pages. That usually fixes it.
> > >
> > > Don't know if upgrading will help you, but this usually corrects the> > > for my group.
> > >
> > > HTH,
> > >
> > > bill
> > >
> > > "Francis Shanahan" <fs@NoSpamPlease.francisshanahan.com> wrote in> > > news:#4wjehJRDHA.3880@tk2msftngp13.phx.gbl...
> > > > Folks,
> > > > I have a base page which is the grand-daddy of all my pages. It
> > > inherits
> > > > from System.UI.Web.Page
> > > >
> > > > From this I inherit a layout page.
> > > >
> > > > From this I inherit the individual pages themselves.
> > > >
> > > > The problem: My pages can no longer be brought up in the designer.> code> > > using
> > > > Visual Studio 2002 and these pages are written in asp.NET with the>> > components.> > > > behinds in vb.NET.
> > > >
> > > > The ancestors are all just regular .vb classes with no visual> >> > > > Even when I switch my pages back to inherit directly from
> > > System.UI.Web.Page
> > > > I can't bring them up in the designer. This is a real pain.
> > > >
> > > > Has anyone seen this?
> > > >
> > > > Will upgrading to Visual Studio 2003 fix the bug?
> > > >
> > > > Cheers,
> > > > -fs
> > > >
> > > >
> > > >
> > >
> > >
> >
>
Francis Shanahan Guest
-
Eric #5
Re: "Cannot Be Designed" error
Are any of the properties in your base page class accessing stuff that
relies on the page context (i.e. the Request or Response object,
User.Identity, etc)? You mentioned using a cookie so that may be the case.
That can cause a problem as VS.NET accesses all properties when opening the
page in design view and throws an exception if you are doing stuff like
that. The workaround is to check for a null context in the offending
properties. For example:
public string MyProperty
{
get
{
// This prevents an exception being reported in design view
if(this.Context == null)
return null;
... do stuff that accesses context-related data ...
}
}
"Francis Shanahan" <fs@NoSpamPlease.francisshanahan.com> wrote in message
news:%234wjehJRDHA.3880@tk2msftngp13.phx.gbl...inherits> Folks,
> I have a base page which is the grand-daddy of all my pages. Itusing> from System.UI.Web.Page
>
> From this I inherit a layout page.
>
> From this I inherit the individual pages themselves.
>
> The problem: My pages can no longer be brought up in the designer. I'mSystem.UI.Web.Page> Visual Studio 2002 and these pages are written in asp.NET with the code
> behinds in vb.NET.
>
> The ancestors are all just regular .vb classes with no visual components.
> Even when I switch my pages back to inherit directly from> I can't bring them up in the designer. This is a real pain.
>
> Has anyone seen this?
>
> Will upgrading to Visual Studio 2003 fix the bug?
>
> Cheers,
> -fs
>
>
>
Eric Guest
-
Francis Shanahan #6
Re: "Cannot Be Designed" error
Thanks to all who responded.
I believe I've traced the cause of my error to the reference path on the
project.
If I add the following path, I can no longer design inherited forms using
visual studio 2002
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\
If I remove this and hence roll back the default references to the v1.0 of
the framework, all seems hunky dory. I've tried removing and adding this and
it seems fairly consistent. I can only hope this is fixed by my upgrade of
visual studio to 2003 as I'm using v1.1 features of drop down controls and
also XSL apis have changed.
-fs
"Francis Shanahan" <fs@NoSpamPlease.francisshanahan.com> wrote in message
news:%234wjehJRDHA.3880@tk2msftngp13.phx.gbl...inherits> Folks,
> I have a base page which is the grand-daddy of all my pages. Itusing> from System.UI.Web.Page
>
> From this I inherit a layout page.
>
> From this I inherit the individual pages themselves.
>
> The problem: My pages can no longer be brought up in the designer. I'mSystem.UI.Web.Page> Visual Studio 2002 and these pages are written in asp.NET with the code
> behinds in vb.NET.
>
> The ancestors are all just regular .vb classes with no visual components.
> Even when I switch my pages back to inherit directly from> I can't bring them up in the designer. This is a real pain.
>
> Has anyone seen this?
>
> Will upgrading to Visual Studio 2003 fix the bug?
>
> Cheers,
> -fs
>
>
>
Francis Shanahan Guest



Reply With Quote

