GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET 2.0
Go To First  |  Previous Question  |  Next Question 
 ASP.NET 2.0  |  Question 105 of 160    Print  
What are the main differences between .net 1.1 and 2.0

  
Total Answers and Comments: 4 Last Update: February 27, 2007     Asked by: vvkumar 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: anishcp
 

ASP.NET 2.0 introduces a lot of new features. Some of this features aim to simplify the problems faced using the earlier versions and some features are introduced to provide lot of new facilities.

            The most important features that are incorporated in ASP.NET 2.0 are:

 

(a)    Master Pages

 

Master pages are introduced to remove one of the most important deficiencies of earlier version of ASP.NET. One thing that has become apparent in the earlier version of ASP.NET is the lack of architecture for applying a consistent look and feel. In earlier version of ASP.NET whenever a developer wants to replicate a common functionality of a web page in other pages, the most possible options he uses is creating a user control and then replicate the functionality in other pages.

            ASP.NET 2.0 aims to solve this problem by introducing the concept of Master pages. First the developer needs to define a master page containing the content that he wants to appear on other pages and then use the ContentPlaceHolder controls to define the locations where the sub pages can plug in the content of their own. The he has to build the sub pages - .aspx pages – that reference the master using directives like this one:

 

<%@Page MasterPageFile = ~/MyMasterPage.master” %>

 

In addition, an application can designate a default Master Page in web.config as shown here:

 

<configuration>
<system.web>
<pages masterPageFile="~/
MyMasterPage.master " />
</system.web>
</configuration>

 

 

(b)   PreCompilation

 

By default, ASP.NET web pages and code files are compiled dynamically when a first request is made to the page. After the initial compilation, the compiled pages is cached; the cache is used to satisfy the subsequent requests for the same page. Even though this approach is flexible, when the page is requested for the first time, it requires a bit of extra time to compile the code. You can avoid this overhead by leveraging a new feature known as precompilation; by using this feature, you can compile an ASP.NET web site before making the web site available to the users.

 

(c)    Sharing code in the application

                 

                  In earlier version of ASP.NET, if you were to reference a reusable component from your dot net application, you had to compile the assembly and place it in the bin folder (or place it in the GAC) of the web application. But now with ASP.NET 2.0, creating a reusable component is very simple and straightforward. All you need to do is to create a component in a pre-defined subdirectory called code. Any component placed in this directory will be automatically compiled at runtime into a single assembly. This assembly is automatically referenced and will be available to all the page in the site.

(d)   Themes and Skins

ASP.NET 2.0 introduces the concepts of Themes and Skins by means of which the look and feel of the web pages can be enhanced to a great extent to make them visually catchy and attractive.

A skin is a set of visual attributes applied to a control type. A theme is a collection of skins. There are a lot of predefined themes in ASP.NET 2.0. One can use it by using the following line of code:

<%@ Page Theme=”SmokeAndGlass” %>

The page directive’s Them attribute declaratively applies a theme to a page. Themes can also be applied programmatically using the page class’s Theme property



Above answer was rated as good by the following members:
kadiyalain, JhansiraniAlla
September 11, 2006 12:52:32   #1  
anishcp Member Since: August 2006   Contribution: 6    

RE: What are the main differences between .net 1.1 and...

ASP.NET 2.0 introduces a lot of new features. Some of this features aim to simplify the problems faced using the earlier versions and some features are introduced to provide lot of new facilities.

The most important features that are incorporated in ASP.NET 2.0 are:

(a) Master Pages

Master pages are introduced to remove one of the most important deficiencies of earlier version of ASP.NET. One thing that has become apparent in the earlier version of ASP.NET is the lack of architecture for applying a consistent look and feel. In earlier version of ASP.NET whenever a developer wants to replicate a common functionality of a web page in other pages the most possible options he uses is creating a user control and then replicate the functionality in other pages.

ASP.NET 2.0 aims to solve this problem by introducing the concept of Master pages. First the developer needs to define a master page containing the content that he wants to appear on other pages and then use the ContentPlaceHolder controls to define the locations where the sub pages can plug in the content of their own. The he has to build the sub pages - .aspx pages that reference the master using directives like this one:

< @Page MasterPageFile ~/MyMasterPage.master >

In addition an application can designate a default Master Page in web.config as shown here:

<configuration>
<system.web>
<pages masterPageFile ~/
MyMasterPage.master />
</system.web>
</configuration>

(b) PreCompilation

By default ASP.NET web pages and code files are compiled dynamically when a first request is made to the page. After the initial compilation the compiled pages is cached; the cache is used to satisfy the subsequent requests for the same page. Even though this approach is flexible when the page is requested for the first time it requires a bit of extra time to compile the code. You can avoid this overhead by leveraging a new feature known as precompilation; by using this feature you can compile an ASP.NET web site before making the web site available to the users.

(c) Sharing code in the application

In earlier version of ASP.NET if you were to reference a reusable component from your dot net application you had to compile the assembly and place it in the bin folder (or place it in the GAC) of the web application. But now with ASP.NET 2.0 creating a reusable component is very simple and straightforward. All you need to do is to create a component in a pre-defined subdirectory called code. Any component placed in this directory will be automatically compiled at runtime into a single assembly. This assembly is automatically referenced and will be available to all the page in the site.

(d) Themes and Skins

ASP.NET 2.0 introduces the concepts of Themes and Skins by means of which the look and feel of the web pages can be enhanced to a great extent to make them visually catchy and attractive.

A skin is a set of visual attributes applied to a control type. A theme is a collection of skins. There are a lot of predefined themes in ASP.NET 2.0. One can use it by using the following line of code:

< @ Page Theme SmokeAndGlass >

The page directive s Them attribute declaratively applies a theme to a page. Themes can also be applied programmatically using the page class s Theme property


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
September 15, 2006 04:32:26   #2  
Sreekanth Ramakrishnan        

RE: What are the main differences between .net 1.1 and...
In terms of .NET Framework1.Introduction of Partial Classes. (Partial Classes allow you to implement the functionality of a class partially allow other developers to implement the other part.).2. Generics.In terms of ASP.NET Framework:1. Ability to post the data from from .aspx page to another page directly using the
attribute.2. The output in XHTML and improved support for Browsers.3. Introduction of new controls like GridView FormView DetailsView4. Ability to write asp.net pages in various .NET languages. (.NET 1.1 forced the developer to use a single language thro' out the project).
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
September 25, 2006 05:30:37   #3  
Shyam S        

RE: What are the main differences between .net 1.1 and...
We can have a base class which will be inherited from Syste.UI.Page and all other pages inheriting this.
 
Is this answer useful? Yes | No
February 27, 2007 08:45:10   #4  
Deepak        

RE: What are the main differences between .net 1.1 and...

One is dynamic menu. We can create dynamic menus using .Net 2.0 but not with 1.1


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape