In .NET 1.1, the method for deployment was to build a web
site, which compiled all of the ASP.NET code into a single assembly, which was
deployed with the application. The benefit to this was that the application
could program against the various page class models because each page was in
the same assembly, the pages "knew" of each other. This is also the
case in .NET 2.0, with the web application project template that can be
downloaded and registered in Visual Studio.
However, native .NET 2.0 web sites do not work that way. Each
page is dynamically compiled (or precompilation is an option). Because of that,
each page does not know about the other because it does not exist in the same
assembly. But there are ways to communicate between pages and user controls,
which we shall examine in this article.