Q
Problem solve Get help with specific problems with your technologies, process and projects.

Problems using design view

I am an ASP.NET (VB) programmer/consultant. I work on three different machines at three different work sites.

At worksite one, when I open almost any aspx page that has an associated .vb code-behind file, I get the following error dialog:

"The file failed to load in the web form designer. Please correct the following error, then load again: Visual Studio cannot open a designer for the file because the class within it does not inherit from a class that can be visually designed."

After clicking OK, the source file opens in HTML view. I cannot switch to design view at all.

On machines two and three, I can open that same file and not receive the error message (although I still cannot use design view).

Since I get the error on one machine (actually I get the same error at home also) but not on the other two, I assume it is some sort of configuration issue, but I can't find where it is.

Interestingly, I can create a new .aspx/vb file and cut and paste the code into the new pages and design view does work, until I close them out in Visual Studio. When I try to reopen them, I get the same error message as with the original.

I don't use design view much anyway, but I am curious why I can't use it (the code-behind page inherits from Page), or why I get the error message on some machines, but not others.

Sorry to be so long-winded! Thanks.
You may want to check the class you are deriving your ASP.NET page from. If they are not derived from System.Web.UI.Page you may want to check if the derivation class is in the Global Assembly Cache (GAC) or otherwise accessible by your application. When I've seen this error before, it's been related to the IDE not finding the derivation class. If you do have access to the page derivation class, you're probably looking at a bug in the development environment.

This was last published in April 2003

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

SearchCloudApplications

Close