ASP.NET 2.0 has a lot of great new features. I've been working with it for about a year and I'm very impressed with what you can do with Visual Studio 2005 and ASP.NET 2.0.
But...
There is always a 'but I hate what they did with my...' statement isn't there? I'm not happy with some of the changes. I've run into a few annoyances, shook my head at some of the new 'features' and ranted about some of the other changes. Today however I'm going to share a tip that I find useful for dealing with the removal of the component tray for ASP.NET 2.0 web pages.
1.x component tray.
In Visual Studio 2002/2003 the Forms designer has a area called the component tray for all non-visual UI components. When you drag a DataSet or SqlConnection to the webform they get added to the component tray.
This is nice because it keeps the components out of your way and doesn't clutter up the HTML designer or Design view of your form.
Missing in Visual Studio 2005
In Visual Studio 2005 the component tray has vanishied in the Webform designer. Now you end up with your non-visible components, like the SqlDataSource, on your page designer.
Tip: Move the components out of your way
I found out that I can put the components in a Panel control and they still work correctly. Then I can move the panel to an out of the way spot on the page. Sort of like making my own component tray.
Steps to reproduce
- Add a panel to your webpage.
- With the panel selected - click the Layout/Position/Relative menu item. This makes the panel drag-able in the form designer.
- Drag the components you want to move to the Panel control.
- Drag the Panel to your desired location.