What’s New in Version 2?



What's New in Version 2?


By Elden Nelson


As I'm sure you've guessed, Microsoft's been hard at work on the next version of ASP.NET, which will be part of the next version of Visual Studio .NET (code-named "Whidbey"). They've been keeping a pretty tight lid on what's new, though - at least until now. Although Microsoft still hasn't unveiled most of what we can expect to see in ASP.NET 2.0, I was able to talk with Shawn Nandi, Microsoft's ASP.NET product manager, to find out at least a couple of the most important features we can expect to see. Says Nandi, "The features we're including in ASP.NET 2 come from the great feedback we've received from the developer community on ASP.NET version 1 and tools like Visual Studio .NET and Web Matrix."


Master Pages

You want pages in your site to have a consistent look and feel. In the current versions of ASP.NET, it's pretty common to use controls to encapsulate and reuse certain content elements of your site, such as the header and footer. There is no easy way in ASP.NET 1.0, however, to define and reuse a common page layout for your site. In ASP.NET 2.0, master pages will give you a simple way to share page layouts. You define a template for the generic layout of a page on your site (this is called the master page), then you have individual pages on the site inherit from that template. The big advantage here is when you want to change the look of the site, instead of rearranging the controls on all the pages in your site, you simply change the master page, which in turn dictates the page layouts on your site.


And what does this mean to you? Steven Smith, owner and manager of http://www.aspalliance.com, is one of the few people who has seen the next version of this product. He says, "Right now there's no one good way to do a page template that you can change in one place and have it affect the whole site. And while a number of people are implementing their own solutions, they typically lack designer support in VS .NET. To me, the biggest thing master pages bring is a standardized way to add templates to your site, with good designer support in the new editor that's going to be coming out. When you change the master template, those changes are reflected in the design view of the page. It's very consistent and easy to use, especially compared to inheritance, which is what most of the current page template solutions use."


Data Controls

Recognizing the need for simplified data access in Web applications, the new data controls feature lets you easily drag and drop tables from databases onto a Web form, much like you would in Web Matrix today. Behind the scenes, VS. NET then does everything necessary to hook up the table to the Web form. This eliminates many manual steps necessary in VS .NET today.


How will this impact you? Well, you'll have less code to write to get data-bound behavior on your pages. Steven Smith points out, "Right now, every time you have a DataGrid and want to assign it to a data source, you have to write three lines of code to say 'my data source is this,' and then do a DataGrid.DataBind. What data controls will allow you to do is declaratively just drag and drop a DataGrid onto a page and then drag a source onto the page, set some properties, and then just run it. You'll also be able to write data controls to support data formats VS .NET doesn't have."


Of course, this is just the tip of the iceberg; count on many new features being revealed within the next few months. And as Microsoft takes the wraps off ASP.NET 2.0, asp.netPRO and asp.netNOW will keep you up to speed with what they do and how you'll make the most of them. Meanwhile, I'm interested: What features do you most want to see in ASP.NET 2.0? Let me know, and I'll bend Microsoft's ear. E-mail me at [email protected].


Elden Nelson is editor-in-chief of asp.netPRO and its companion e-newsletter, asp.netNOW.


Tell us what you think! Please send any comments about this article to [email protected]. Please include the article title and author.




Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.