1.Difference
between trace and debug in .NET
S.No
|
Trace
|
Debug
|
1
|
This class works only when your
application build defines the symbol TRACE.
|
This class works only when your
application build defines the symbol DEBUG.
|
2
|
For tracing, you have to use
Trace.WriteLine statements.
|
For tracing, you have to use
Debug.WriteLine statements.
|
3
|
Trace class is generally used to
trace the execution during deployment of the application.
|
You generally use debug classes at
the time of development of application.
|
4
|
Trace class works in both debug
mode as well as release mode.
|
Debug class works only in debug
mode.
|
5
|
Performance analysis can be done
using Trace class.
|
Performance analysis cannot be
done using Debug class.
|
6
|
Trace runs in a thread that is
different from the Main Thread.
|
Debug runs in the same thread in
which your code executes.
|
7
|
Trace is used during Testing Phase
and Optimization Phase of different releases.
|
Debug is used during Debugging
Phase
|
2.Difference
between ASP and ASPX
S.No
|
ASP
|
ASPX
|
1
|
The .asp is the file extension of
the classic ASP page.
|
The .aspx is the file extension of
ASP.NET page.
|
2
|
ASP stands for Active Server
Pages.
|
ASPX is the acronym of Active
Server Pages Extended.
|
3
|
The .asp file runs under the
process space of inetinfo.exe, which is an IIS process space.
|
The .aspx file runs in a separate
worker process called as aspnet_wp.exe.
|
4
|
The .asp file can execute only in
platforms of Microsoft technology. It cannot run in non-Microsoft platforms
like Apache Web Server.
|
The .aspx file can run on any
platforms, be it Microsoft or not. Hence .aspx file can be executed in Apache
Web Server as well.
|
5
|
The .asp file can be coded in only
two languages namely VBScript and Javascript. Both these languages are client
side languages.
|
The .aspx file can be coded using
any .NET language including VB.NET, C#. Both VB.NET and C# are Server Side
Languages.
|
6
|
In .asp file, the executable code
can be included outside a function scope where in the function is located
inside the script block marked as runat=server.
|
In .aspx file, the executable code
cannot be included outside a function scope where in the function is located
inside the script block marked as runat=server.
|
7
|
In .asp file, a function can be
defined inside server side script tags.
|
In .aspx file, a function cannot
be defined inside server side script tags.
|
8
|
In .asp file, all the directives
will be placed in the page’s first line using <%@Page Language= “Jscript”
%> tag.
|
In .aspx, the language directive
must be enclosed within page directive as <%@Page Language= “VB” %>
|
3.Difference
between thread and process
S.No
|
Thread
|
Process
|
1
|
Threads share the address space of
the process that created it.
|
Processes have their own address.
|
2
|
Threads have direct access to the
data segment of its process
|
Processes have their own copy of
the data segment of the parent process.
|
3
|
Threads can directly communicate
with other threads of its process
|
Processes must use interprocess
communication to communicate with sibling processes.
|
4
|
Threads have almost no overhead
|
Processes have considerable
overhead
|
5
|
New threads are easily created
|
New processes
require duplication of the parent process.
|
6
|
Threads can exercise considerable
control over threads of the same process
|
Processes can only exercise
control over
child processes
|
7
|
Changes to the main thread
(cancellation, priority change, etc.) may affect the behavior of the
other threads of the process
|
Changes to the parent process does
not
affect child processes.
|
4.Difference between
ASPX and ASCX
S.No
|
ASPX
|
ASCX
|
1
|
ASP.NET Page uses the extension
.aspx
For eg: Default.aspx
|
User Control uses the extension
.ascx
For eg: WebUserControl.ascx.
|
2
|
ASP.NET Page begin with a Page
Directive.
For eg:
<%@ Page
Language="C#"
AutoEventWireup="true"
CodeFile="Default.aspx.cs"
Inherits="_Default"
%>
|
User Control begin with a Control
Directive.
For eg:
<%@ Control
Language="C#"
AutoEventWireup="true"
CodeFile="WebUserControl.ascx.cs"
Inherits="WebUserControl"
%>
|
3
|
Usercontrol code can be used in
webforms
|
We can not use webforms in
usercontrol.
|
4
|
ASP.NET Page can be viewed
directly in the Browser.
|
User Control cannot be viewed
directly in the browser. User Controls are added to WebPages and we view them
by requesting a web page in our browser
|
5
|
ASP.NET page has HTML, Body or
Form element.
|
User Control does not have a HTML,
Body or Form element.
|
1.
What
are the differences between Inline code and Code Behind Code?
S.No
|
Inline code
|
Code Behind Code
|
1
|
Its within .aspx file
|
Its in a external class file
|
2
|
Dynamically compiled
|
Compiled prior to deployment
and
linked with .aspx file |
2.
What
are the differences between Global.asax and Web.Config?
S.No
|
global.asax
|
web.config
|
1
|
It is a class file
|
It is an XML file
|
2
|
There can be only one for an
application
|
There can be many if under
different sub-folders
|
3
|
Can have Application and Session
events
|
Cannot have Application and
Session events
|
4
|
Need to be recompiled when changes
are made
|
No need to compile when changes
are made
|
3.
What
are the Differences between Server.Transfer and Response.Redirect?
S.No
|
Server.Transfer
|
Response.Redirect
|
1
|
The navigation happens on the
server-side ,so client history is not updated
|
The navigation happens on the
client-side ,so client history is updated
|
2
|
Data can be persist across the
pages using Context.Item collection
|
Context.Items loses the
persistence
|
3
|
No Round-trips
|
Makes a Round-trip
|
4
|
Has Good encapsulation
|
No
|
4.
What
is the difference between a custom control and a user control?
S.No
|
User Control
|
Custom Control
|
1
|
Is a file with the .ascx extension
|
Is a file with the .dll extension
|
2
|
Can be only used with the
application
|
Can be used in any number of
applications
|
3
|
Language dependent
|
They are language independent, a
control
created in c# can be used in vb.net |
4
|
Cannot be added to Visual studio
Toolbox
|
Can be added to Visual studio
Toolbox
|
5
|
Inherits from Server controls and
easy to create
|
We have to develop from scratch
,
so comparatively difficult |
6
|
Generally used for static content
|
Used when dynamic content is
required
|
5.
What
is the difference between Caching and Application?
S.No
|
Caching
|
Application
|
1
|
Cache have expire policy
|
Application does not have expire
policy
|
2
|
Cache does not require explicit
locking
|
Application require explicit
locking
|
3
|
Cache has the Property of timeout,
which allows us to control the duration of the Objects so cached
|
Application variables exist as
long as the application is alive
|
4
|
Output
can be cached in 4 ways,
·
Page
Output Caching
·
Page
Partial Caching
·
DataSource
Caching
·
Data
Caching
|
Application does not have options
as like Cache object
|
5
|
It is accessible to page level to
all the users
|
It is accessible to both page
level and application level to all the users
|
6.
What
is the difference between web farm and web garden?
S.No
|
Web farm
|
Web garden
|
1
|
A web application running on
multiple servers is called a web farm.
|
A web application running on a
single server that has multiple CPUs is called a web garden.The benefit of
using this is, if one server crashes then other will work instantly.
|
2
|
For Web Garden, we have to
use
in Machine.Config file.
|
Web Farm is implemented using
techniques like Net Work Load Balancing.
|
Summary:
Web garden and web farms are asp.net
applications that serve the purpose when the
user base of a web site increases considerably.
user base of a web site increases considerably.
For Web garden/Web Farm configurations, we
have to set sessionState mode to
StateServer/SQLServer in the web.config file.
StateServer/SQLServer in the web.config file.
7. What is the difference between Application and
Session Events?
S.No
|
Application Event
|
Session Event
|
1
|
Application events are used to
initialize objects and data that we do want to make available to all the
current sessions of our web application
|
Session events are used to
initialize data that we want to keep throughout individual sessions, but that
we do not want to share between sessions
|
8.
What
is the difference between Session Cookies and Persistent Cookies?
S.No
|
Session Cookies
|
Persistent Cookies
|
1
|
Session Cookies do not have
expiration date
|
Persistent Cookies have an
expiration date. The expiration date indicates to the browser that it should
write the cookie to the client’s hard drive
|
9.
What
are the differences between Server Controls and HTML Controls?
S.No
|
Server Controls
|
HTML Controls
|
1
|
Server Controls can trigger
control-specific events on the server
|
HTML Controls can trigger only
page-level events on server (postback)
|
2
|
Data entered in a server control
is maintained across requests. Server controls retain state
|
Data is not maintained in an HTML
control. Data must be saved and restored using page-level scripts
|
3
|
The Microsoft .NET Framework
provides a set of properties for each server control. Properties allows us to
change the server control’s appearance and behavior within server-side code
|
HTML controls have HTML attributes
only
|
4
|
Server controls automatically
detect browser and adapt display as appropriate
|
We must detect browser in code or
write for least common denominator
|
10.
What
are the differences between ViewState and Hidden fields?
11.
S.No
|
ViewState
|
Hidden fields
|
1
|
This is used for pages that will
postback to itself
|
This is used for pages that will
postback to itself or to another page
|
2
|
This is built in structure for
maintaining state of a page
|
This is not an inbuilt structure
|
3
|
Security is more as data is
hashed, compressed and encoded
|
Security is less when compared to
ViewState
|
11.
What
is the difference between SQL Cache Notification and SQL Cache Invalidation?
S.No
|
SQL Cache Notification
|
SQL Cache Invalidation
|
1
|
Using SQL Cache Notification, we
can generate notifications when the data of a database on which a cached item
depends changes
|
Using SQL Cache Invalidation, we
can make a cached item invalid that depends on the data stored in a SQL
server database, when the data in the SQL server database is changed
|
12.
What
is the difference between absolute time expiration and sliding time expiration?
S.No
|
Absolute time expiration
|
Sliding time expiration
|
1
|
In absolute time expiration, a
cached item expires after the expiration time specifies for it, irrespective
of how often it is accessed
|
In sliding time expiration, the
time for which the item is cached is each time incremented by its expiration
time if it is accessed before completion of its expiration time
|
13.
What
is the difference between adding items into cache through Add() method and
Insert() method?
S.No
|
Cache.Add()
|
Cache.Insert()
|
1
|
Cache.Add() method also returns an
object representing the item we have added in the cache ,besides adding the
item in the cache
|
Cache.Insert() method adds only
the item in the cache
|
2
|
It is not possible to replace an
existing item in the cache using the Cache.Add() method
|
We can replace an existing item in
the cache using the Cache.Insert() method
|
14.
What
is the difference between page-level caching and fragment caching?
S.No
|
Page-level caching
|
Fragment caching
|
1
|
In Page-level caching, we cache a
whole page
|
In Fragment caching, we cache
parts of the web page such as a user control added to the web page
|
15.
What
is the difference between Label control and Literal control?
S.No
|
Label control
|
Literal control
|
1
|
Final HTML code of a Label control
has an HTML tag
|
Final HTML code of a Literal
control contains only text, which is not surrounded by any HTML tag
|
16.
What
is the difference between HyperLink control and LinkButton control?
S.No
|
HyperLink control
|
LinkButton control
|
1
|
A HyperLink control do not have
Click and Command events
|
A LinkButton control have Click
and Command events, which can be handled in the code behind file of the web
page
|
17.
What
is the difference between an HtmlInputCheckBox control and an
HtmlInputRadioButton control?
S.No
|
HtmlInputCheckBox control
|
HtmlInputRadioButton control
|
1
|
We can select more than one
HtmlInputCheckBox control from a group of HtmlInputCheckBox controls
|
We can select only a single
HtmlInputRadioButton control from a group of HtmlInputRadioButton controls
|
18.
How
a content page differs from a master page?
S.No
|
Content page
|
Master page
|
1
|
A content page does not have
complete HTML source code
|
A master page has complete HTML
source code inside its source file
|
19.
How
will you differentiate a submaster page from a top-level master page?
S.No
|
Submaster page
|
Top-level master page
|
1
|
Like a content page, a submaster
page also does not have complete HTML source code
|
Top-level master page has complete
HTML source code inside its source file
|
20.
What
is the difference between a page theme control and a global theme?
S.No
|
Page theme
|
Global theme
|
1
|
A page theme is stored inside a
subfolder of the App_Themes folder of a web application
|
A global theme is stored inside
the Themes folder on a web server
|
2
|
It can be applied to individual
web pages of the web application
|
It can be applied to all the web
sites on the web server
|
21.
What
is the difference between a default skin and a named skin?
S.No
|
Default skin
|
Named skin
|
1
|
A default skin does not have a
SkinId attribute
|
A named skin has a SkinId attribute
|
2
|
It is automatically applied to all
the controls of the same type present on a web page
|
It is applied to a control
explicitly by setting the SkinId property of the control from the Properties
window
|
22.
Differentiate
Globalization and Localization
S.No
|
Globalization
|
Localization
|
1
|
Globalization is the process of
identifying the specific portion of a web application that needs to be
different for different languages and isolating that portion from the core of
the web application
|
Localization is the process of
configuring a web application to be supported for a specific language or
locale
|
2
|
example:
a)consider this tag in Web.Config file. It would cause the dates to be displayed in French for the web page of the folder where this Web.Config file is located. b) CultureInfo d=new CultureInfo("de-DE"); Response.Write(DateTime.Now.ToString("D",d); It would display date in long format using German culture |
example:
we have 2 resource files: a)default.aspx.fr-FR.resx b)default.aspx.en-US.resx Using appropriate coding in the .aspx.cs files of a web page, the strings written in these resource files can be used to change the text of the strings dynamically. |
23.
What
are the differences between web.config and machine.config?
S.No
|
web.config
|
machine.config
|
1
|
This is automatically created when
we create an ASP.Net web application project
|
This is automatically installed
when we install Visual Studio. Net
|
2
|
This is also called application
level configuration file
|
This is also called machine level
configuration file
|
3
|
We can have more than one
web.config file
|
Only one machine.config file
exists on a server
|
4
|
This file inherits setting from
the machine.config
|
This file is at the highest level
in the configuration hierarchy
|
Difference
between HttpHandler and HttpModule
S.No
|
HttpHandler
|
HttpModule
|
1
|
Meaning:
An ASP.NET HTTP
handler is the process (frequently referred to as the "endpoint")
that runs in response to a request made to an ASP.NET Web application. The
most common handler is an ASP.NET page handler that processes .aspx files.
When users request an .aspx file, the request is processed by the page
through the page handler. We can create our own HTTP handlers that render
custom output to the browser.In order to
create a Custom HTTP Handler,we need to Implement IHttpHandler
interface(synchronous handler) or
Implement
IHttpAsyncHandler(asynchronous handler).
|
Meaning:
An HTTP module is an
assembly that is called on every request that is made to our application.
HTTP modules are called as part of the ASP.NET request pipeline and have
access to life-cycle events throughout the request. HTTP modules examine
incoming and outgoing requests and take action based on the request.
|
2
|
When to use HTTP handlers:
RSS feeds: To create an RSS feed for a Web site, we can create
a handler that emits RSS-formatted XML. We can then bind a file name
extension such as .rss to the custom handler. When users send a request to
your site that ends in .rss, ASP.NET calls our handler to process the
request.
Image server: If we want a Web application to serve images in a variety
of sizes, we can write a custom handler to resize images and then send them
to the user as the handler’s response.
|
When to use HTTP modules:
Security: Because we can examine incoming requests, an HTTP module
can perform custom authentication or other security checks before the
requested page, XML Web service, or handler is called. In Internet
Information Services (IIS) 7.0 running in Integrated mode, we can extend
forms authentication to all content types in an application.
Statistics and logging: Because HTTP modules are called on every request, we
can gather request statistics and log information in a centralized module,
instead of in individual pages.
Custom headers or footers: Because we can modify the outgoing response, we can
insert content such as custom header information into every page or XML Web
service response.
|
3
|
How to develop an ASP.NET handler:
All we need is implementing
IHttpHandler interface
public class MyHandler
:IHttpHandler
{
public bool IsReusable
{
get { return false; }
}
public void
ProcessRequest(HttpContext context)
{
}
}
|
How to develop a Http Module:
All we need is implementing
System.Web.IHttpModule interface.
public class MyHttpModule :
IHttpModule
{
public void Dispose()
{
}
public void Init(HttpApplication
context)
{
//here we have to define handler
for events such as BeginRequest ,PreRequestHandlerExecute
,EndRequest,AuthorizeRequest and ....
}
// you need to define event
handlers here
}
|
4
|
Number of HTTP handler called:
During the processing of an http
request, only one HTTP handler will be called.
|
Number of HTTP module called:
Whereas more than one HTTP modules
may be called.
|
5
|
Processing Sequence:
In the asp.net request pipe line
,http handler comes after http Module and it is the end point objects in
ASP.NET pipeline.
|
Processing Sequence:
In the asp.net request pipe line,
http Module comes first.
|
6
|
What it does actually?
HTTP Handler actually processes
the request and produces the response
|
What it does actually?
HTTP module can work on request
before and on the response after HTTP Handler
|
7
|
HTTP Handler implement following
Methods and Properties:
Process Request: This method is called when processing asp.net
requests. Here you can perform all the things related to processing request.
IsReusable: This property is to determine whether same instance
of HTTP Handler can be used to fulfill another request of same type.
|
Http Module implements following
Methods and Properties:
InIt: This method is used for implementing events of HTTP
Modules in HTTPApplication object.
Dispose: This method is used perform cleanup before Garbage
Collector destroy everything.
|
8
|
Summary:
If we need to create a request
handler, for example we may want our own code to handle all .jpg image file
requests like: http://mysite.com/filename.jpg, then we need to use
HttpHandlers for this purpose.
|
Summary:
If we want to modify a certain
request, like we may want to perform some custom logic behind the scenes
whenever user requests pages like mysite.com/default.aspx, we need to use
HttpModules. We can create multiple HttpModules to filter any request.
|
1.Difference
between .NET Application Development and Traditional Application Development
S.No
|
.NET Application
Development
|
Traditional
Application Development
|
1
|
Using .NET Framework,
your program will be compiled into an intermediate language representation
called MSIL (Microsoft Intermediate Language).
|
Your program will be
compiled into an assembly language code that is very specific to the platform
in which you are running your application.
|
2
|
MSIL code will not
contain any API calls specific to any platform.
|
Assembly language code
will contain API calls specific to the current application platform.
|
3
|
This MSIL code is then
converted into machine code at runtime using CLR (Common Language Runtime).
|
This assembly language
code is then converted into machine code.
|
4
|
Optimization is done
at runtime by CLR.
|
Optimization is done
by the compiler itself at compile time.
|
5
|
The compiler used in
this process is static meaning that it checks only for syntax and the
necessary semantics.
|
The compiler is not
static. It performs both compilation as well as optimization.
|
6
|
Libraries used by your
program are linked even before generating MSIL, but it is linked in an
un-compiled form. This will be compiled by the compiler and it will be used
by the CLR while executing the program.
|
Libraries used by your
program are linked only after generating the machine code.
|
7
|
The program will not
directly call APIs of the operating system. Instead CLR will act as a
mediator. CLR will call API's of operating system and the result of execution
will be returned to program.
|
Now the program is
ready for execution by the operating system. The program will directly call APIs
of the operating system.
|
8
|
Automatic memory
management and garbage collection is done by CLR.
|
No automatic memory
management or garbage collection.
|
9
|
.NET Framework Class
Library provides object oriented libraries.
|
No object oriented
principles are incorporated.
|
2.Difference
between CSS and Themes
S.No
|
CSS
|
Themes
|
1
|
Applies to all HTML
Controls
|
Applies to all the
server controls
|
2
|
Is applied on the
Client Side in the Browser
|
Is applied on the
server rather than in the browser
|
3
|
We can apply multiple
style sheets to a single page
|
But we cannot apply
multiple themes to a single page. Only one theme we can apply for a single
page.
|
4
|
The CSS supports
cascading
|
But themes does not
support cascading
|
5
|
The CSS cannot
override the property values defined for a control.
|
But any property
values defined in a theme, the theme property overrides the property values
declaratively set on a control, unless we explicitly apply by using the
StyleSheetTheme property.
|
6
|
Cannot be Applied
through the configuration files
|
Can be Applied through
Configuration Files.
|
7
|
Can be used directly
via a reference to the css file location
|
All theme and Skin
files should be placed in a special Asp.net folder called the “App_Themes” in
order for the themes to work and behave normally.
|
8
|
Do not require any
other resource like Skin files
|
Each theme should be
associated with at least one Skin file.
|
9
|
In case of CSS you can
define only style properties
|
But a theme can define
multiple properties of a control not just style properties such as we can
specify the graphics property for a control, template layout of a GridView
control etc.
|
3.Difference
between Postback and Callback
S.No
|
Postback
|
Callback
|
1
|
A Postback occurs when
the data (the whole page) on the page is posted from the client to the
server..ie the data is posted-back to the server, and thus the
page is refreshed.
|
A callback is also a
special kind of
postback, but it is
just a quick round-trip to the server to get a small set of data(normally),
and thus the page is not refreshed, unlike with the postback.
|
2
|
With Asp.Net, the
ViewState is refreshed when a postback is invoked.
|
With Asp.Net, the
ViewState is not
refreshed when a
callback is invoked.
|
3
|
A postback occurs when
a request is sent from the client to the server for the same page as the
one the user is currently viewing. When a postback occurs, the entire page is
refreshed and you can see the typical progression on the progress bar at the
bottom of the browser.
|
A callback, generally
used with AJAX,
occurs when a request
is sent from the
client to the server
for which the page is not refreshed, only a part of it is updated without any
flickering occurring on the browser.
|
4.Difference
between Session.Clear() and Session.Abandon()
S.No
|
Session.Clear()
|
Session.Abandon()
|
1
|
Session.Clear() just
removes all values (content) from the Object. The session with the same key
is still alive.It is just like giving value null to this session.
|
Session.Abandon()
destroys the session and the Session_End event is triggered and in the next
request, Session_Start will be fired.
|
2
|
Use Session.Clear(),
if we want user to remain in the same session and we don not want user to
relogin or reset all his session specific data.
|
So, if we use
Session.Abandon(), we wil lose that specific session and we will get a new
session key. We could use it for example when the user logs out.
|
1.Difference between
ViewState and SessionState
S.No
|
ViewState
|
SessionState
|
1
|
View state is
maintained in page level only.
|
Session state is
maintained in session level.
|
2
|
View state of one page
is not visible in another page.i.e., when user requests another page previous
page data will be no longer available.
|
Session state value is
available in all pages within a user session.i.e., The data will be no longer
available if user close thebrowser or session timeout occurs.
|
3
|
View state information
stored in client only.
|
Session state
information stored in server.
|
4
|
View state persist the
values of particular page in the client (browser) when post back operation
done.
|
Session state persist
the data of particular user in the server. This data available till user
close the browser or session time completes.
|
5
|
View state used to
persist page-instance-specific data.
|
Session state used to
persist the user-specific data on the server side.
|
2.Difference between
ViewState and ControlState
S.No
|
ViewState
|
ControlState
|
1
|
ViewState can be
disabled
|
Control State cannot
be disabled.
|
2
|
ViewState is
implemented by using EnableViewState property of a control to true.
|
Control State works
even when EnableViewState is off.
To use Control State
(for example in a custom control) we have to override OnInit method,call
RegisterRequiresControlState method in OnInit method and then override the
SaveControlState and LoadControlState methods.
|
3
|
ViewState is used to
maintain page-level state for large data
|
Control State is used
for small data only.
eg: maintain clicked page number in a GridView even when EnableViewState is off |
3.Difference between
SessionState and Cookies
S.No
|
SessionState
|
Cookies
|
1
|
Session can store any
type of data because the value is of datatype of "object"
|
Cookies can store only
"string" datatype
|
2
|
These are stored at
Server side
|
They are stored at
Client side
|
3
|
Session are secured
because it is stored in binary format/encrypted form and it gets decrypted at
server
|
Cookie is non-secure
since stored in text format at client side
|
4
|
Session is independent
for every client i.e individual for every client
|
Cookies may or may not
be individual for every client
|
5
|
There is no limitation
on size or number of sessions to be used in an application
|
Due to cookies network
traffic will increase.Size of cookie is limited to 40 and number of cookies
to be used is restricted to 20.
|
6
|
For all
conditions/situations we can use sessions
|
Only in few situations
we can use cookies because of no security
|
7
|
We cannot disable the
sessions.Sessions can be used without cookies also(by disabling cookies)
|
We can disable cookies
|
8
|
The disadvantage of
session is that it is a burden/overhead on server
|
Since the value is
string there is no security
|
9
|
Sessions are called as
Non-Persistent cookies because its life time can be set manually
|
We have persistent and
non-persistent cookies
|
Difference between
ASP.Net 2.0 and ASP.Net 3.5
SNo
|
Feature
|
ASP.Net 2.0
|
ASP.Net 3.5
|
1
|
New Features
|
ASP.Net 2.0 includes
the following as new features,
1.
Master
Pages
2.
Profiles
3.
GridView
Control
|
ASP.Net 3.5 includes
the following as new features,
1.
ListView
Control
2.
DataPager
Control
3.
Nested
Master Pages
4.
LinqDataSource
Control
|
2
|
Multi-targeting
|
ASP.Net 2.0 does not
support Multi-Targeting environment.
|
ASP.Net 3.5 supports
multi-targeting. It means that we choose from a drop-down list whether to
have Visual Studio 2008 build applications against the ASP.NET 2.0, 3.0, or
3.5 frameworks.
|
3
|
AJAX Support
|
There is no in-built
support for AJAX in ASP.Net 2.0. Instead, it has to be downloaded and
installed.
|
In ASP.Net 3.5, AJAX
is integrated into the .NET Framework, thereby making the process of building
intuitive cool user interfaces easier.
|
4
|
Siverlight Support
|
It does not support
Siverlight.
|
It supports
Siverlight.
|
5
|
Javascript Debugging
|
It does not provide
Javascript debugging.
|
It provides Javascript
debugging.
|
6
|
LINQ Support
|
It does not support
LINQ.
|
It Supports Language
Integrated Query (LINQ).
|
Difference between ASP.NET 3.5 and ASP.NET 4.0
S.No
|
ASP.NET 3.5
|
ASP.NET 4.0
|
1
|
Whether Client data can be
directly accessed ?
In ASP.NET 3.5, the data from the
client side cannot be directly accessed. The client side data can only
be accessed using script manager’s Page methods,
interface named
ICallbackEventHandler
or by using the component
XMLHttpHandler.
|
Whether Client data can be
directly accessed ?
In ASP.NET 4, the data from the
client side can be directly accessed using client data view and client
data context objects.
Following methods are available in
ASP.NET 4.0 to access Client data directly,
1) Client data controls
2) Client templates 3) Client data context |
2
|
Whether we can set MetaTags
(Keywords,Description) in the Page Directive?
In ASP.NET 3.5, two meta tags can
be used, one with name as keywords and other with name as description to
record the keywords and description for SEO purpose.
Please look atMetaTags for
ASP.NET 3.5
|
Whether we can set MetaTags
(Keywords,Description) in the Page Directive?
The meta keywords and meta
description is really useful for
SEO
optimization of the web page. In
ASP.NET 4, the keywords and
description can be included as
part of page directive itself.
Please look at MetaTags
for ASP.NET 4.0
|
3
|
Whether ViewState can be applied
at the Control level ?
ASP.NET 3.5 EnableViewState
property cannot be used to apply ViewState at the Control level.It is mainly
used at the page level.Its default value is True and its acceptable values ae
True and False.
|
Whether ViewState can be applied
at the Control level ?
In ASP.NET 4, ViewState mechanism is improved to set ViewState at the Contol level besides at the page level set by EnableViewState property in ASP.NET 3.5 .Its default value is Inherit and acceptable values areEnabled,Disabled and Inherit. |
4
|
How ASP.NET 3.5 identifies
ClientID ?
In ASP.NET 3.5, ClientId property
has to be used to find the dynamically generated client id.
|
How ASP.NET 4.0 identifies
ClientID ?
In ASP.NET 4, a property called
ClientIDMode is newly introduced
to identify and record the ClientId easily.
ClientIDMode has following values.
AutoID – Same as ASP.NET 3.5
Static – There won’t be any separate clientid generated at run time Predictable-These are used particularly in datacontrols. Format is like clientIDrowsuffix with the clientid vlaue Inherit- This value specifies that a control’s ID generation is the same as its parent. The default value of ClientIDMode for a page isPredictable. The default value of ClientIDMode for a control is Inherit. Because the default for controls isInherit, the default generation mode is Predictable. |
5
|
Whether permanent redirection is
possible or not ?
There is no RedirectPermanent()
method available in ASP.NET 3.5.
Redirect method is less useful
than the RedirectPermanent method. It will cause search engine results to be
less current, and this can also impact performance because visitors will not
be accessing the best URL. Redirect may be most useful for login pages or
more complex situations.
|
Whether permanent redirection is
possible or not ?
ASP.Net 4.0 introduced a new URL
redirection method RedirectPermanent() which avoids round trips.
We can implement this as shown below:
RedirectPermanent("/newpath/newpage.aspx");
RedirectPermanent returns a 301
HTTP response—it redirects permanently to another location. Search engines
such as Google and Bing will change their indexes to point to the new page
directly. To call RedirectPermanent you will need to get the Response object
from the HttpContext.
Then, you can call RedirectPermanent: if you pass false as
the second parameter, you can perform further actions and avoid an exception.
|
6
|
Output Caching Enhancement:
OutPut Cache in ASP.Net 3.5 has a
limitation - generated content always has to be stored in memory, and on
servers that are experiencing heavy traffic, the memory consumed by output
caching can compete with memory demands from other portions of a Web application.
|
Output Caching Enhancement:
ASP.NET 4 adds an extensibility
point to output caching that enables you to configure one or more custom
output-cache providers. Output-cache providers can use any storage mechanism
to persist HTML content. This makes it possible to create custom output-cache
providers for diverse persistence mechanisms, which can include local or
remote disks, cloud storage, and distributed cache engines.
In order to know how to implement
Custom Output Caching, please refer to the following URL,
|
7
|
QueryExtender Control for
filtering the data returned by EntityDataSource and LinqDataSource controls:
There is no QueryExtender control
available in ASP.NET 3.5 to filter the data returned by DataSource Controls(
EntityDataSource and LinqDataSource).It has to explicitly use 'Where clause'
in the data source.
|
QueryExtender Control for
filtering the data returned by EntityDataSource and LinqDataSource controls:
QueryExtender Control is an add-on
to the DataSource Controls: EntityDataSource and LinqDataSource.
QueryExtender is used to filter the data returned by these controls. As the
QueryExtender control relies on LINQ, the filter is applied on the database
server before the data is sent to the page, which results in very efficient
operations.
i.e., QueryExtender Control is
intended to be used to create filters for data that is retrieved from a data
source, without using an explicit Where clause in the data source. The
control can be used to filter data in the markup of a Web page by using
declarative syntax.
Please look at QueryExtender
Control in ASP.NET 4.0
|
No comments:
Post a Comment