Saturday, March 31, 2012

The bass class System.Web.UI.Page cannot be designed.

Help!!

I am now getting the following error concerning the Microsoft Development Environment in .NET:

=========================================================
The file failed to load in the Web Form designer. Please correct the following error, then load it again: 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:

contactbroker -- The base class 'System.Web.UI.Page' cannot be designed.
=========================================================

What do I need to do. This happens with all of my .aspx pages not just the one listed in the error message. Is there another reference I need to load into my solution. I currently have the following reference listed:

Microsoft.Web.UI.WebControls
MSHTML
stdole
System
System.Data
System.Drawing
System.Security
System.Web
System.Web.ReqularExpressions
System.Web.Services
System.Windows.Forms
System.XML
tabDlg

I hope this is enought info to help you figure out what my problem is, other than be too ignorant to figure it out for myself...

Thanks

ArtAre you trying to build a page class in a usercontrol?
I guess I don't even know enough to understand your question. Can you help me out a little further? Thanks
Yeah, that was a bad response on my part. Basically, are you trying to do things in an ascx file that should are meant for aspx. If you are working in an aspx page, you can use the system.web.ui.page, but if you are in a usercontrol (ascx) you must make use of system.web.ui.usercontrol or whatever. Also remember (Just a heads up, not releated to your current problem), a page can only have one form tag and your ascx files cannot have a form tag because this is used in the page which those usercontrols will sit inside of.
Here is my situation. I installed .NET Framework 1.1 yesterday. I already had .NET Framework 1.0 installed. I installed 1.1 because I wanted to take advantage of the HasRows Property when check to see if a dataReader had returned any rows. After I installed 1.1 I got an error on the HasRows property. I then removed the version 1.0 System.Data, System.Drawing, System.Security, System.Web, System.Web.RegularExpressions, System.WebServices, and System.XML references and replaced them all with 1.1 version. Well the HasRows problem went away but now, every time I try to open one of my .aspx pages I get the error that is the subject of this post. Additoinally I can no longer get into the design mode for any of these forms.

I haven't changed any of the code, or added any additional references to the project.
What version of Visual Studio are you using?
Microsoft Development Environment 2002 Version 7.0.94466

0 comments:

Post a Comment