Practical ASP.NET

Visual Studio 2008 and ASP.NET 3.5

Peter shares what he likes -- and doesn't -- in Visual Studio 2008 and ASP.NET 3.5

To be honest, there isn't much for the developer in ASP.NET 3.5. There are lots of goodies in the .NET Framework as a whole (LINQ, for instance) but there's not much aimed at the ASP.NET developer. On the other hand, Visual Studio 2008 has seen a bundle of enhancements that ASP.NET developers will like.

In ASP.NET 3.5, the only new control in the ASP.NET toolbox is the ListView, which is sort of a grown-up version of the old DataList. It repeats rows on the page like a DataGrid but allows you to put your own content in each row, like a FormView. Unfortunately, ListView doesn't have a design surface so you have to work with it in Source view. The SmartTag for the control offers some preset layouts so your best option is to pick a layout in Design view that's close to what you want and then modify the results in Source view.

The ListView doesn't support paging but it can be used with the new DataPager to enable paging. The DataPager lets you separate your paging controls from the ListView itself and provides more customization options than the paging controls built into the 2.0 DataViews. Sadly, the DataPager doesn't appear to work with anything other than the ListView.

Moving to Source View?
As my comment about the lack of a design surface for the ListView suggests, I'm not an HTML kind of guy. I grew up as a coder and that's what I remain. When I need a site to actually look good, I call on people who know more HTML than I do (either Katherine Grace or Russell Sinclair). Not surprisingly, then, I build my pages in Design view with drag-and-drop.

However, I may yet change. When editing an ASPX page, Visual Studio 2008 offers Split view. Split view allows me to simultaneously display a Design view of the page in one pane and a Source view in another pane. Since I can see in the Design view pane the results of my work in the Source view pane, I find that I'm doing more work in Source view.

The major difficulty I have with Split view is that I'm running out of screen space. Using Split view effectively cuts my editing window in half. I've finally gotten myself down to having just one computer and it's a laptop. As a result, the largest screen I'll ever have is 17 inches. So, while I like Split view very much, there are real costs associated with it.

On the other hand, the improved support for CSS in Visual Studio is an almost unalloyed good for a drag-and-drop kind of guy like me. I can now set up the structure of a Master Page using CSS just by dragging my mouse around in Source view (for more on this, see Daniel Moth's video here).

Awkwardness-es
Other changes don't seem to have any upside. I use Master Pages on almost every site that I build. This means that I'm normally dropping new controls into Content controls. In Visual Studio 2008, I'm finding it difficult to drag and drop controls into Content controls because the Content controls seem to wrap themselves very tightly around any controls they already contain. One of the reasons that I'm finding myself using Split view more is because I'm switching to Source view to open up space inside a Content control by adding some carriage returns before the closing </asp:Content> tag.

In Visual Studio 2008, when you select a control it pops up a tab along its top that displays the control's type and Id value (e.g., asp:Button#Button4). While I appreciate not having to look at the Property window to see if I've selected the right thing, quite frankly, these tabs get in the way as much as they help. When I have controls placed close together, the tabs often make it difficult to select the top control.

Would I go back to Visual Studio 2005? No. But it's going to be two or three months before I acquire the "finger knowledge" to be as productive in Visual Studio 2008 as I was in 2005.

About the Author

Peter Vogel is a system architect and principal in PH&V Information Services. PH&V provides full-stack consulting from UX design through object modeling to database design. Peter tweets about his VSM columns with the hashtag #vogelarticles. His blog posts on user experience design can be found at http://blog.learningtree.com/tag/ui/.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube