Sunday, June 12, 2011

Difference Between Asp.Net 2003 and Asp.Net 2005

Difference Between Asp.Net 2003 and Asp.Net 2005


ASP.NET 2003

ASP.NET 2005

When you compile the application in .NET 1.x, Visual Studio 2003 would automatically
compile only certain file types such as ASP.NET pages, Web services, user controls,
HTTP handlers, Resource files, and Global.asax class files. The rest of the files
needed to be explicitly compiled before finally publishing your code to the web
server.

In Visual Studio 2005, you no longer need to compile all the files into an assembly.
The ASP.NET dynamic compilation engine allows to automatically compile applications,
that includes .aspx, .cs, .vb files. That means, simply create an application and
publish it. All the files in the App_Code folder are dynamically compiled to a single
assembly, named code.dll. The assembly has an application scope and is created in
the Temporary ASP.NET Files folder, well outside the Web application space.

There is no option to create dll of single page so if you modify a single code behined
page still you have to upload entire project dll

Giving option to make dll of single page so that if you modify a code behind page
then you can only upload/change that page dll.

The code-behind model requires an IIS virtual directory.

The code-behind model can directly access the local installation of IIS.

The code-behind model lacks support for FTP, local file systems, and direct IIS
access.

The code-behind model has multiple ways to open Web sites.

It requires IIS on the development computer.

It already has a built-in Web server.

Unable to open individual pages outside the project.

Need not open the entire project; you can open individual pages outside the project,
it is achieved through the compile-on-demand feature.

It requires explicit addition of files to the project.

It eliminates the need to explicitly add files to the project.

In ASP.NET 1.x presentation page (aspx) and the code behind page are linked by inheritance
aspx page inherit from the code behind page. But if you want to access any aspx
control then it must be declare in code behind page(when you drag any control then
it automatically generate code into the code behind page but some time it does not
create code when you write html rather then drag the control for that you have to
open design view so that it generate code into the code behind page)

n asp.net 2.0 the presentation page (aspx) and the code behind page are interact
with inheritance same as that of asp.net 1.0 but with additional feature which is
partial class. Partial classes enable you to declare a class in more than one physical
file. When the class gets compiled, one class is generated from all the partial
classes. The advantage of using partial classes is that you don’t need to worry
about declaring a control in both the presentation page and code-behind file. Anything
that you declare in the presentation page is available automatically in the code-behind
file, and anything you declare in the code-behind file is available automatically
in the presentation page.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.