Inheriting from System.Web.UI.WebControls.Style

  • Thread starter Nathan Sokalski
  • Start date
N

Nathan Sokalski

I have a class named CustomStyle that inherits from
System.Web.UI.WebControls.Style. When I double-click the file in Solution
Explorer in Visual Studio 2008, it opens a tab with the following title:

CustomStyle.vb [Design]

This window contains the following message:

To add components to your class, drag them from the Toolbox and use the
Properties window to set their properties. To create methods and events for
your class, click here to switch to code view.

I am able to switch to code view and edit my code with no problem, but why
is Visual Studio 2008 not simply opening the file in code view
automatically? Code is the only thing in the file that can be edited anyway.
Any help would be appreciated. Thanks.
 
T

Teemu

I am able to switch to code view and edit my code with no problem, but why
is Visual Studio 2008 not simply opening the file in code view
automatically? Code is the only thing in the file that can be edited
anyway. Any help would be appreciated. Thanks.

I have also noticed this. Normally I see this situation when I have created
a user control which inherits from Component instead of UserControl.

I think this is just a "feature" in VS, still quite annoying one.

-Teemu
 

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

Top