SYS-CON MEDIA Authors: Kevin Remde, RealWire News Distribution, Phil Worms, Mike Benkovich, CJ Fearnley

Related Topics: .NET

.NET: Article

.NET Developer's Journal's Derek Ferguson Introduces ASP.NET 2.0 Focus Issue

Can Too Much Master Pagination Make You Go Blind?

Derek Ferguson (pictured), editor-in-chief of .NET Developer's Journal, writes: As I write this, I am simultaneously preparing to present on ASP.NET 2.0 at three local MSDN Events (www.msdnevents.com), building an advanced ASP.NET 2.0 Web site for my client at Magenic, and pulling together the last bits of the magazine that you now hold in your hands - our ASP.NET 2.0 Focus Issue for 2005. While the specifics of each of these ASP.NET 2.0 projects differ from each other, the one thing that they all have in common is that they all involve a lot of master pagination.

This is to say that they all leverage master pages - the technology in ASP.NET 2.0 that allows Web developers to factor content that is common to multiple pages in their sites onto a single (sometimes more) page. This page - the so-called master page - then becomes the central storehouse for shared content, which can be referenced and used by any other page in the application without duplication of code and/or content.

The question that I'm most often asked about master pages is: Why use master pages when I could achieve the same effect using frames or user controls? To these folks, I say: Once you've started master paging, you won't ever want to stop!

The problems - of which there are many - with HTML frames have to do with the fact that they do not result in the creation of a single, server-side ASP.NET page. Instead, they wind up dragging down multiple pages worth of HTML content for rendering into separate frames on the browser client. This means that each frame in a frames-based Web application becomes a separate entity with its own life cycle and path for communicating back with the server. This makes sharing information between pages that are running in different frames difficult, to say the least.

User controls seem like a great solution until the first time you actually build a substantial ASP.NET site using them. One of my first projects for Magenic required that I estimate an extension to an existing ASP.NET solution, which made extensive use of user controls. After looking at over 100 pages that consisted mainly of gray "user control" boxes with only a little dynamic content, it became clear to me that the poor design-time experience offered by user controls made them a bad choice for any situation that requires significant ASP.NET code reuse.

Master pages offer a mechanism for sharing ASP.NET elements across multiple pages with rich design-time support that allows you to see (though not change) your shared content on every page you load into Visual Studio 2005, albeit in half-color.

Thom Robbins's article on master pages, then, is a key article in our ASP.NET 2.0 focus for this issue. Also, be sure to check out Vishwas Lele's piece on AJAX-style development - the best coverage currently in print of what you can do with asynchronous callbacks in ASP.NET 2.0 today, prior to the launch of Microsoft's official Atlas offering for this purpose later this year.

More Stories By Derek Ferguson

Derek Ferguson, founding editor and editor-in-chief of .Net Developer's Journal, is a noted technology expert and former Microsoft MVP.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
.NET News Desk 08/22/05 01:56:40 PM EDT

Can Too Much Master Pagination Make You Go Blind? As I write this, I am simultaneously preparing to present on ASP.NET 2.0 at three local MSDN Events (www.msdnevents.com), building an advanced ASP.NET 2.0 Web site for my client at Magenic, and pulling together the last bits of the magazine that you now hold in your hands - our ASP.NET 2.0 Focus Issue for 2005. While the specifics of each of these ASP.NET 2.0 projects differ from each other, the one thing that they all have in common is that they all involve a lot of master pagination.