This article explores a comparison chart between ASP.NET 1.x and ASP.NET 2.0.
Summary: This article explores a comparison chart between ASP.NET 1.x and ASP.NET 2.0.
Applies to:
Comparison chart between ASP.NET 2003 and ASP.NET 2005
The following table explains some of the basic comparison between ASP.NET 1.X to ASP.NET 2.0.
In Visual Studio 2005, you no longer need to compile all the files into an assembly. The ASP.NET dynamic compile engine allows to automatically compile the applications, that includes .aspx, .cs, .vb files. That means, simply create application and publish it.
A shared class consists of reusable source components in the Code folder.The new Code-Separation model extends the Compile-on-Demand feature to the classes bound to a Web page, but it does not stop there; helper classes can also take advantage of it. You can keep your helper classes and business objects in the App_Code folder. ASP.NET monitors the folder and compiles any new class file that is added or edited. The resulting assembly is automatically referenced in the application and shared between all pages participating in the site.You should put only components into the App_Code folder. Do not put pages, Web user controls, or other non-code files containing non-code elements into the App_Code subdirectory. All the files in the App_Code folder are dynamically compiled to a single assembly, named code.dll. The assembly has application scope and is created in the Temporary ASP.NET Files folder, well outside the Web application space.
Pages that use code separation take advantage of a feature known as Partial Classes. When the page runs, ASP.NET 2.0 dynamically creates and instantiates a class representing the page and the compiler uses the CodeFile attribute in the @Page directive to find the file containing the code.
The Inherits attributes defines the name of the class that will be created and this should be default, the page name as the basis for creating the class name.
PropertiesThe properties of the Page object fall into two distinct groups: intrinsic objects and page-specific properties. Intrinsic objects include references to environmental standalone objects such as Cache, User, and Trace. They also include references to the classic intrinsic objects that form the HTTP context, such as Session, Application, and Request. Page-specific properties are all the properties that affect or describe the state of the page, for example, IsPostBack, EnableViewState, and SmartNavigation.The new properties of the Page class can also be categorized into either of the preceding groups.
The three important new properties are:
MethodsThe Page class features several new methods, most of which are simply inherited from the base Control class.Some of the important methods are:
ASP.NET 2.0 adds quite a few new events to allow you to follow the request processing more closely and precisely. These new events are discussed in the following table.
New Events in ASP.NET 2.0
Developers can dynamically modify the page output and the state of constituent controls by writing these events into the code.
For details of code behind and compilation in ASP.NET, visit the site
http://msdn.microsoft.com/msdnmag/issues/06/01/ExtremeASPNET/ Conclusion
This article has just focused some of the common difference between ASP.Net 1.X and ASP.NET 2.0. Some of the concepts, such as partial class, have greatly simplified things for developers who choose to follow the code-behind model for ASP.NET development without the use of an IDE like Visual Studio.NET. The other features, such as deployment pre-compilation, clearly translate to better performance and protection intellectual property. On the whole, with the introduction of ASP.NET 2.0 Microsoft has provided developers with a wealth of features with plenty of flexibility.
Diving Into ASP.NET WebAPI